Skip to content

Commit

Permalink
pata_of_platform: Remove "electra-ide" quirk
Browse files Browse the repository at this point in the history
"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>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Alexander Shiyan authored and Tejun Heo committed Aug 23, 2014
1 parent 4f37b50 commit ca99140
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions drivers/ata/pata_of_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit ca99140

Please sign in to comment.