lkml.org 
[lkml]   [2014]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC net-next v1 1/9] ptp: introduce programmable pins.
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-03-10 15:01    [W:0.042 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site