On Tuesday 28 June 2011, ashishj3 wrote: > +static struct platform_driver da9052_wled1_driver = { > + .probe = da9052_backlight_probe, > + .remove = da9052_backlight_remove, > + .driver = { > + .name = "da9052-WLED1", > + .owner = THIS_MODULE, > + }, > +}; > + > +static struct platform_driver da9052_wled2_driver = { > + .probe = da9052_backlight_probe, > + .remove = da9052_backlight_remove, > + .driver = { > + .name = "da9052-WLED2", > + .owner = THIS_MODULE, > + }, > +}; > + > +static struct platform_driver da9052_wled3_driver = { > + .probe = da9052_backlight_probe, > + .remove = da9052_backlight_remove, > + .driver = { > + .name = "da9052-WLED3", > + .owner = THIS_MODULE, > + }, > +}; > + > +static int __init da9052_backlight_init(void) > +{ > + int ret; > + > + ret = platform_driver_register(&da9052_wled1_driver); > + if (ret) > + return ret; > + > + ret = platform_driver_register(&da9052_wled2_driver); > + if (ret) > + return ret; > + > + ret = platform_driver_register(&da9052_wled3_driver); > + if (ret) > + return ret; > + > + return 0; > +} > +module_init(da9052_backlight_init);
As mentioned before, you should only need to register a single driver for these three devices: Either you name them all the same and just give the individual devices a different platform_device->id, or you leave them with different names and add a platform_driver->id_table to match them all. Arnd _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev