> -----Original Message----- > From: Thomas Petazzoni [mailto:thomas.petazzoni@xxxxxxxxxxxxxxxxxx] > Sent: Friday, October 08, 2010 1:20 AM > To: Guruswamy, Senthilvadivu > Cc: khilman@xxxxxxxxxxxxxxxxxxx; tomi.valkeinen@xxxxxxxxx; paul@xxxxxxxxx; > Hiremath, Vaibhav; linux-omap@xxxxxxxxxxxxxxx > Subject: Re: [PATCH v1 07/16] OMAP3: hwmod DSS: Create platform_driver for > each DSS HW IP > > Hello Senthil, > > I forgot one comment: in most Linux drivers, it is customary to put the > platform_driver definition just above the driver initialization > function, both of them at the end of the file. Of course, it's nothing > mandatory, but most of the drivers are organized this way, making it > easy for developers to find their way in all drivers. > > So, in other words, this: > [Senthil] I put it above as part of all the static methods and structures. Will look at the other omap drivers before I change. > > +/* DISPC HW IP initialisation */ > > +static int omap_dispchw_probe(struct platform_device *pdev) > > +{ > > + return 0; > > +} > > + > > +static int omap_dispchw_remove(struct platform_device *pdev) > > +{ > > + return 0; > > +} > > + > > +static struct platform_driver omap_dispchw_driver = { > > + .probe = omap_dispchw_probe, > > + .remove = omap_dispchw_remove, > > + .driver = { > > + .name = "dss_dispc", > > + .owner = THIS_MODULE, > > + }, > > +}; > > Should be just above this: > > > +static int __init omap_dispc_init(void) > > +{ > > + return platform_driver_register(&omap_dispchw_driver); > > +} > > + > > +device_initcall(omap_dispc_init); > > Regards, > > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com -- 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