Commit bfc2f01f authored by David Brownell's avatar David Brownell Committed by Bartlomiej Zolnierkiewicz

palm_bk3710: improve IDE registration

* fix device tree ... don't forget to set the parent device

* let init/exit code be removed where practical
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
[bart: splitted it from bigger DaVinci patch, s/hw.parent/hw.dev/]
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 96f80219
...@@ -343,7 +343,7 @@ static struct ide_port_info __devinitdata palm_bk3710_port_info = { ...@@ -343,7 +343,7 @@ static struct ide_port_info __devinitdata palm_bk3710_port_info = {
.mwdma_mask = ATA_MWDMA2, .mwdma_mask = ATA_MWDMA2,
}; };
static int __devinit palm_bk3710_probe(struct platform_device *pdev) static int __init palm_bk3710_probe(struct platform_device *pdev)
{ {
struct clk *clk; struct clk *clk;
struct resource *mem, *irq; struct resource *mem, *irq;
...@@ -389,6 +389,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) ...@@ -389,6 +389,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
hw.io_ports_array[i] = base + IDE_PALM_ATA_PRI_REG_OFFSET + i; hw.io_ports_array[i] = base + IDE_PALM_ATA_PRI_REG_OFFSET + i;
hw.io_ports.ctl_addr = base + IDE_PALM_ATA_PRI_CTL_OFFSET; hw.io_ports.ctl_addr = base + IDE_PALM_ATA_PRI_CTL_OFFSET;
hw.irq = irq->start; hw.irq = irq->start;
hw.dev = &pdev->dev;
hw.chipset = ide_palm3710; hw.chipset = ide_palm3710;
palm_bk3710_port_info.udma_mask = rate < 100000000 ? ATA_UDMA4 : palm_bk3710_port_info.udma_mask = rate < 100000000 ? ATA_UDMA4 :
...@@ -412,13 +413,11 @@ static struct platform_driver platform_bk_driver = { ...@@ -412,13 +413,11 @@ static struct platform_driver platform_bk_driver = {
.name = "palm_bk3710", .name = "palm_bk3710",
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.probe = palm_bk3710_probe,
.remove = NULL,
}; };
static int __init palm_bk3710_init(void) static int __init palm_bk3710_init(void)
{ {
return platform_driver_register(&platform_bk_driver); return platform_driver_probe(&platform_bk_driver, palm_bk3710_probe);
} }
module_init(palm_bk3710_init); module_init(palm_bk3710_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment