lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Nov 2014 20:40:20 +0000
From:	Paul Zimmerman <Paul.Zimmerman@...opsys.com>
To:	"dinguyen@...nsource.altera.com" <dinguyen@...nsource.altera.com>,
	"balbi@...com" <balbi@...com>
CC:	"dinh.linux@...il.com" <dinh.linux@...il.com>,
	"swarren@...dotorg.org" <swarren@...dotorg.org>,
	"b.zolnierkie@...sung.com" <b.zolnierkie@...sung.com>,
	"matthijs@...in.nl" <matthijs@...in.nl>,
	"r.baldyga@...sung.com" <r.baldyga@...sung.com>,
	"jg1.han@...sung.com" <jg1.han@...sung.com>,
	"sachin.kamat@...aro.org" <sachin.kamat@...aro.org>,
	"ben-linux@...ff.org" <ben-linux@...ff.org>,
	"dianders@...omium.org" <dianders@...omium.org>,
	"kever.yang@...k-chips.com" <kever.yang@...k-chips.com>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCHv7 3/8] usb: dwc2: convert to use dev_pm_ops API

> From: dinguyen@...nsource.altera.com [mailto:dinguyen@...nsource.altera.com]
> Sent: Tuesday, November 11, 2014 9:14 AM
> 
> From: Dinh Nguyen <dinguyen@...nsource.altera.com>
> 
> Update suspend/resume to use dev_pm_ops API.
> 
> Signed-off-by: Dinh Nguyen <dinguyen@...nsource.altera.com>
> ---
>  drivers/usb/dwc2/platform.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
> index eeba8a4..b94867b 100644
> --- a/drivers/usb/dwc2/platform.c
> +++ b/drivers/usb/dwc2/platform.c
> @@ -219,9 +219,9 @@ static int dwc2_driver_probe(struct platform_device *dev)
>  	return retval;
>  }
> 
> -static int dwc2_suspend(struct platform_device *dev, pm_message_t state)
> +static int dwc2_suspend(struct device *dev)
>  {
> -	struct dwc2_hsotg *dwc2 = platform_get_drvdata(dev);
> +	struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev);
>  	int ret = 0;
> 
>  	if (dwc2_is_device_mode(dwc2))
> @@ -229,9 +229,9 @@ static int dwc2_suspend(struct platform_device *dev, pm_message_t state)
>  	return ret;
>  }
> 
> -static int dwc2_resume(struct platform_device *dev)
> +static int dwc2_resume(struct device *dev)
>  {
> -	struct dwc2_hsotg *dwc2 = platform_get_drvdata(dev);
> +	struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev);
>  	int ret = 0;
> 
>  	if (dwc2_is_device_mode(dwc2))
> @@ -239,15 +239,18 @@ static int dwc2_resume(struct platform_device *dev)
>  	return ret;
>  }
> 
> +static const struct dev_pm_ops dwc2_dev_pm_ops = {
> +	SET_SYSTEM_SLEEP_PM_OPS(dwc2_suspend, dwc2_resume)
> +};
> +
>  static struct platform_driver dwc2_platform_driver = {
>  	.driver = {
>  		.name = dwc2_driver_name,
>  		.of_match_table = dwc2_of_match_table,
> +		.pm = &dwc2_dev_pm_ops,
>  	},
>  	.probe = dwc2_driver_probe,
>  	.remove = dwc2_driver_remove,
> -	.suspend = dwc2_suspend,
> -	.resume = dwc2_resume,
>  };
> 
>  module_platform_driver(dwc2_platform_driver);

Acked-by: Paul Zimmerman <paulz@...opsys.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ