| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. |
|---|
| 3 | 4 | * http://www.samsung.com |
|---|
| .. | .. |
|---|
| 9 | 10 | * Based on: |
|---|
| 10 | 11 | * PATA driver for AT91SAM9260 Static Memory Controller |
|---|
| 11 | 12 | * 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. |
|---|
| 16 | 13 | */ |
|---|
| 17 | 14 | |
|---|
| 18 | 15 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 609 | 606 | #ifdef CONFIG_PM_SLEEP |
|---|
| 610 | 607 | static int pata_s3c_suspend(struct device *dev) |
|---|
| 611 | 608 | { |
|---|
| 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); |
|---|
| 614 | 610 | |
|---|
| 615 | 611 | return ata_host_suspend(host, PMSG_SUSPEND); |
|---|
| 616 | 612 | } |
|---|
| 617 | 613 | |
|---|
| 618 | 614 | static int pata_s3c_resume(struct device *dev) |
|---|
| 619 | 615 | { |
|---|
| 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); |
|---|
| 623 | 618 | struct s3c_ide_info *info = host->private_data; |
|---|
| 624 | 619 | |
|---|
| 625 | 620 | pata_s3c_hwinit(info, pdata); |
|---|