diff mbox

[1/4] pata_of_platform: Remove "electra-ide" quirk

Message ID 1408790772-5305-1-git-send-email-shc_work@mail.ru
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Alexander Shiyan Aug. 23, 2014, 10:46 a.m. UTC
"electra-ide" is not used anywhere in the kernel and could be
represented in devicetree in a normal way.
This patch removes specific quirk for "electra-ide".

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/ata/pata_of_platform.c | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

Comments

Tejun Heo Aug. 23, 2014, 5:06 p.m. UTC | #1
On Sat, Aug 23, 2014 at 02:46:10PM +0400, Alexander Shiyan wrote:
> "electra-ide" is not used anywhere in the kernel and could be
> represented in devicetree in a normal way.
> This patch removes specific quirk for "electra-ide".
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>

Applied to libata/for-3.18.

Thanks.
diff mbox

Patch

diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index a7e95a5..6af1c9b 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -35,20 +35,11 @@  static int pata_of_platform_probe(struct platform_device *ofdev)
 		return -EINVAL;
 	}
 
-	if (of_device_is_compatible(dn, "electra-ide")) {
-		/* Altstatus is really at offset 0x3f6 from the primary window
-		 * on electra-ide. Adjust ctl_res and io_res accordingly.
-		 */
-		ctl_res = io_res;
-		ctl_res.start = ctl_res.start+0x3f6;
-		io_res.end = ctl_res.start-1;
-	} else {
-		ret = of_address_to_resource(dn, 1, &ctl_res);
-		if (ret) {
-			dev_err(&ofdev->dev, "can't get CTL address from "
-				"device tree\n");
-			return -EINVAL;
-		}
+	ret = of_address_to_resource(dn, 1, &ctl_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get CTL address from "
+			"device tree\n");
+		return -EINVAL;
 	}
 
 	irq_res = platform_get_resource(ofdev, IORESOURCE_IRQ, 0);
@@ -79,8 +70,7 @@  static int pata_of_platform_probe(struct platform_device *ofdev)
 
 static struct of_device_id pata_of_platform_match[] = {
 	{ .compatible = "ata-generic", },
-	{ .compatible = "electra-ide", },
-	{},
+	{ },
 };
 MODULE_DEVICE_TABLE(of, pata_of_platform_match);