ARM: plat-samsung: use to_platform_device()
Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
This commit is contained in:
parent
f2cac8051d
commit
81c258467c
@ -422,8 +422,7 @@ static int s3c_adc_remove(struct platform_device *pdev)
|
|||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
static int s3c_adc_suspend(struct device *dev)
|
static int s3c_adc_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = container_of(dev,
|
struct platform_device *pdev = to_platform_device(dev);
|
||||||
struct platform_device, dev);
|
|
||||||
struct adc_device *adc = platform_get_drvdata(pdev);
|
struct adc_device *adc = platform_get_drvdata(pdev);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u32 con;
|
u32 con;
|
||||||
@ -444,8 +443,7 @@ static int s3c_adc_suspend(struct device *dev)
|
|||||||
|
|
||||||
static int s3c_adc_resume(struct device *dev)
|
static int s3c_adc_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = container_of(dev,
|
struct platform_device *pdev = to_platform_device(dev);
|
||||||
struct platform_device, dev);
|
|
||||||
struct adc_device *adc = platform_get_drvdata(pdev);
|
struct adc_device *adc = platform_get_drvdata(pdev);
|
||||||
enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data;
|
enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data;
|
||||||
int ret;
|
int ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user