Re: [PATCH][RFC] pm: remove device_type suspend()/resume()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 01 June 2009, Magnus Damm wrote:
> From: Magnus Damm <damm@xxxxxxxxxx>
> 
> This patch removes the legacy callbacks ->suspend() and
> ->resume() from struct device_type. These callbacks seem
> unused, and new code should instead make use of struct
> dev_pm_ops.
> 
> Signed-off-by: Magnus Damm <damm@xxxxxxxxxx>

This is fine by me.

Greg, Pavel, Alan, any objections?

Rafael


> ---
> 
>  Only lightly compile tested on my laptop, could use some
>  multi-arch build farm verification.
> 
>  drivers/base/power/main.c |    7 -------
>  include/linux/device.h    |    3 ---
>  2 files changed, 10 deletions(-)
> 
> --- 0001/drivers/base/power/main.c
> +++ work/drivers/base/power/main.c	2009-06-01 17:07:23.000000000 +0900
> @@ -399,9 +399,6 @@ static int device_resume(struct device *
>  		if (dev->type->pm) {
>  			pm_dev_dbg(dev, state, "type ");
>  			error = pm_op(dev, dev->type->pm, state);
> -		} else if (dev->type->resume) {
> -			pm_dev_dbg(dev, state, "legacy type ");
> -			error = dev->type->resume(dev);
>  		}
>  		if (error)
>  			goto End;
> @@ -641,10 +638,6 @@ static int device_suspend(struct device 
>  		if (dev->type->pm) {
>  			pm_dev_dbg(dev, state, "type ");
>  			error = pm_op(dev, dev->type->pm, state);
> -		} else if (dev->type->suspend) {
> -			pm_dev_dbg(dev, state, "legacy type ");
> -			error = dev->type->suspend(dev, state);
> -			suspend_report_result(dev->type->suspend, error);
>  		}
>  		if (error)
>  			goto End;
> --- 0001/include/linux/device.h
> +++ work/include/linux/device.h	2009-06-01 17:00:20.000000000 +0900
> @@ -293,9 +293,6 @@ struct device_type {
>  	char *(*nodename)(struct device *dev);
>  	void (*release)(struct device *dev);
>  
> -	int (*suspend)(struct device *dev, pm_message_t state);
> -	int (*resume)(struct device *dev);
> -
>  	struct dev_pm_ops *pm;
>  };
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux