On Mon, Mar 10, 2014 at 12:53:09PM +0000, Sørensen, Stefan wrote:
> On Sat, 2014-03-08 at 20:42 +0100, Richard Cochran wrote:

> > +int ptp_find_pin(struct ptp_clock *ptp,
> > +            enum ptp_pin_function func, unsigned int chan)
> > +{
> > +   struct ptp_pin_desc *pin = NULL;
> > +   int i;
> > +
> > +   mutex_lock(&ptp->pincfg_mux);
> > +   for (i = 0; i < ptp->info->n_pins; i++) {
> > +           if (ptp->info->pin_config[i].func == func &&
> > +               ptp->info->pin_config[i].chan == chan) {
> > +                   pin = &ptp->info->pin_config[i];
> > +                   break;
> > +           }
> > +   }
> > +   mutex_unlock(&ptp->pincfg_mux);
> > +
> > +   return pin ? pin - ptp->info->pin_config : -1;
> > +}
> 
> Maybe replace 'pin - ptp->info->pin_config' with 'i'?

Yes, of course.

Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to