Re: [PATCH 01/23] I2C: TWL4030: checkpatch.pl fixes for twl4030-core.c

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

 



On Fri, Apr 11, 2008 at 02:23:05PM +0530, ext Gadiyar, Anand wrote:
> >  static int __init twl4030_init(void)
> >  {
> > -	int res;
> > -
> > -	if ((res = i2c_add_driver(&twl4030_driver))) {
> > -		printk(KERN_ERR "TWL4030: Driver registration failed\n");
> > -		return res;
> > -	}
> > -
> > -	pr_info(KERN_INFO "TWL4030: Driver registration complete.\n");
> > -
> > -	return 0;
> > +	return i2c_add_driver(&twl4030_driver);
> >  }
> 
> You're losing the failure print here. Not sure if it matters, but I'm pointing it out anyway.

i2c subsystem will print it out for usb. No need to leave it here :)

if you follow i2c_add_driver, you'll get to
drivers/i2c/i2c-core.c:i2c_register_driver()

int i2c_register_driver(struct module *owner, struct i2c_driver *driver)
{

[...]

	mutex_lock(&core_lock);

	pr_debug("i2c-core: driver [%s] registered\n", driver->driver.name);

[...]

	return 0;
}

-- 
	- Balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux