Re: [PATCH v2 1/3] Staging: IndustryPack bus for the Linux Kernel

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

 



On Mon, 2012-05-07 at 11:04 +0300, Dan Carpenter wrote:
> 
> [snip]
> 
> > +int ipack_device_find_drv(struct device_driver *driver, void *param)
> > +{
> > +	int ret;
> > +	struct ipack_device *dev = (struct ipack_device *)param;
> > +
> > +	ret = ipack_bus_match(&dev->dev, driver);
> > +	if (ret)
> > +		return !ipack_bus_probe(&dev->dev);
> 
> Wouldn't probe() return zero or a negative error code?

Yes. However, in case of the function called by bus_for_each_drv(), it
should return zero if you want to continue or nonzero value to stop the
iteration.

I considered that if the probe fails, we can try with the next driver in
the list. So, the returned value of probe() is negated.

I will fix the other things and send it again with other suggestions. 

Thanks,

Sam

_______________________________________________
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