Re: [PATCH v2] staging: olpc_dcon: ->read_status() API change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 01, 2011 at 10:55:05PM -0800, Andres Salomon wrote:
> > --- a/drivers/staging/olpc_dcon/olpc_dcon.c
> > +++ b/drivers/staging/olpc_dcon/olpc_dcon.c
> > @@ -755,9 +755,9 @@ static int dcon_resume(struct i2c_client *client)
> >  irqreturn_t dcon_interrupt(int irq, void *id)
> >  {
> >  	struct dcon_priv *dcon = id;
> > -	int status = pdata->read_status();
> > +	u8 status;
> >  
> > -	if (status == -1)
> > +	if (pdata->read_status(&status) == -1)
> >  		return IRQ_NONE;

It would be better to do a check for < 0 instead of -1 or even just
a check for non-zero.

	if (pdata->read_status(&status))
		return IRQ_NONE;

That's more linux-ish.

regards,
dan carpenter


Attachment: signature.asc
Description: Digital signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux