lkml.org 
[lkml]   [2012]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [REGRESION] Suspend hangs with 3.6-rc1 on Lenovo T60 notebook
On Thu, 16 Aug 2012, Miklos Szeredi wrote:

> Yes, this appears to work. Following patch fixes the suspend oops.
>
> Thanks,
> Miklos
>
> ---
> drivers/ide/ide-pm.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c
> index 9240609..8d1e32d 100644
> --- a/drivers/ide/ide-pm.c
> +++ b/drivers/ide/ide-pm.c
> @@ -4,7 +4,7 @@
>
> int generic_ide_suspend(struct device *dev, pm_message_t mesg)
> {
> - ide_drive_t *drive = dev_get_drvdata(dev);
> + ide_drive_t *drive = to_ide_device(dev);
> ide_drive_t *pair = ide_get_pair_dev(drive);
> ide_hwif_t *hwif = drive->hwif;
> struct request *rq;
> @@ -40,7 +40,7 @@ int generic_ide_suspend(struct device *dev, pm_message_t mesg)
>
> int generic_ide_resume(struct device *dev)
> {
> - ide_drive_t *drive = dev_get_drvdata(dev);
> + ide_drive_t *drive = to_ide_device(dev);
> ide_drive_t *pair = ide_get_pair_dev(drive);
> ide_hwif_t *hwif = drive->hwif;
> struct request *rq;

And now you can get rid of the useless dev_set_drvdata() call.

Alan Stern



\
 
 \ /
  Last update: 2012-08-16 19:21    [W:0.064 / U:1.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site