On Fri, Mar 24, 2006 at 02:56:30PM +0530, [EMAIL PROTECTED] wrote:
> Hi all,
>     I was going through platform_driver structure of "sl811-hcd.c". The
> defined structure is given below.
>  
> struct platform_driver sl811h_driver = {
>  .probe = sl811h_probe,
>  .remove = __devexit_p(sl811h_remove),
>  
>  .suspend = sl811h_suspend,
>  .resume = sl811h_resume,
>  .driver = {
>   .name = (char *) hcd_name,
>   .owner = THIS_MODULE,
>  },
> };
> 
> 
> In remove entry point they have used a macro __devexit_p(). What does
> actually this signify?

That the sl811_remove function is marked as a "__devexit" function.  It
is needed in order to keep everything working properly if you define the
various CONFIG_HOTPLUG and CONFIG_PM options.

> Again they have defined the function in the way given below.
> 
> static int __devexit
> sl811h_remove(struct platform_device *dev){}
> 
> Here they have used __devexit. Is it that this is necessary because they
> have used __devexit_p() macro in remove entry point ?
> 
> Is it required to use __devexit_p() macro ? If we do not use this then
> will it cause any problem ?
> 
> Please suggest.

I suggest you don't use __devexit unless you _really_ know and
understand exactly what it is for.  For almost everyone, it doesn't save
them any memory size as the driver isn't built into the kernel, and only
causes problems...

Luckily, it is very hard to disable CONFIG_HOTPLUG now, so problems with
it will be rare.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to