forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/drivers/ata/pata_samsung_cf.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
34 * http://www.samsung.com
....@@ -9,10 +10,6 @@
910 * Based on:
1011 * PATA driver for AT91SAM9260 Static Memory Controller
1112 * PATA driver for Toshiba SCC controller
12
- *
13
- * This program is free software; you can redistribute it and/or modify it
14
- * under the terms of the GNU General Public License version 2
15
- * as published by the Free Software Foundation.
1613 */
1714
1815 #include <linux/kernel.h>
....@@ -609,17 +606,15 @@
609606 #ifdef CONFIG_PM_SLEEP
610607 static int pata_s3c_suspend(struct device *dev)
611608 {
612
- struct platform_device *pdev = to_platform_device(dev);
613
- struct ata_host *host = platform_get_drvdata(pdev);
609
+ struct ata_host *host = dev_get_drvdata(dev);
614610
615611 return ata_host_suspend(host, PMSG_SUSPEND);
616612 }
617613
618614 static int pata_s3c_resume(struct device *dev)
619615 {
620
- struct platform_device *pdev = to_platform_device(dev);
621
- struct ata_host *host = platform_get_drvdata(pdev);
622
- struct s3c_ide_platdata *pdata = dev_get_platdata(&pdev->dev);
616
+ struct ata_host *host = dev_get_drvdata(dev);
617
+ struct s3c_ide_platdata *pdata = dev_get_platdata(dev);
623618 struct s3c_ide_info *info = host->private_data;
624619
625620 pata_s3c_hwinit(info, pdata);