lkml.org 
[lkml]   [2009]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Switch atmel_serial to dev_pm_ops
On Mon, Aug 03, 2009 at 05:09:47PM +0200, Haavard Skinnemoen wrote :
> Albin Tonnerre wrote:
> > +static struct dev_pm_ops atmel_serial_pm_ops = {
> > + .suspend = atmel_serial_suspend,
> > + .resume = atmel_serial_resume,
> > +};
> > #else
> > -#define atmel_serial_suspend NULL
> > -#define atmel_serial_resume NULL
> > +static struct dev_pm_ops atmel_serial_pm_ops;

> Why not

> #define atmel_serial_pm_ops NULL

Because the .pm field is set to the address of atmel_serial_pm_ops, and iirc
taking the address of NULL is not allowed.

> > #endif

> > static int __devinit atmel_serial_probe(struct platform_device *pdev)
> > @@ -1603,11 +1607,10 @@ static int __devexit atmel_serial_remove(struct platform_device *pdev)
> > static struct platform_driver atmel_serial_driver = {
> > .probe = atmel_serial_probe,
> > .remove = __devexit_p(atmel_serial_remove),
> > - .suspend = atmel_serial_suspend,
> > - .resume = atmel_serial_resume,
> > .driver = {
> > .name = "atmel_usart",
> > .owner = THIS_MODULE,
> > + .pm = &atmel_serial_pm_ops,

> Please use a TAB instead of space to make everything nice and
> consistent.

That's weird, because my editor does show a TAB there, and applying the patch
with git am results in a TAB.

Regards,
--
Albin Tonnerre, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com


\
 
 \ /
  Last update: 2009-08-03 17:55    [W:1.834 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site