diff options
author | Tejun Heo <tj@kernel.org> | 2010-05-10 15:41:25 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-05-14 22:38:38 -0400 |
commit | 904924b020c794133607536b346aae268584d0af (patch) | |
tree | dec01625e8ffe775b6f66ea909758f590537832b /drivers/ata | |
parent | c4acf99bdebb84b21cf2d12521f990bbfe5d5500 (diff) |
pata_sch: use ata_pci_sff_init_one()
pata_sch is standard SFF. No reason to open code init. Use
ata_pci_sff_init_one() instead.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_sch.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c index 99cceb458e2a..86b3d0133c7c 100644 --- a/drivers/ata/pata_sch.c +++ b/drivers/ata/pata_sch.c | |||
@@ -174,22 +174,12 @@ static int __devinit sch_init_one(struct pci_dev *pdev, | |||
174 | { | 174 | { |
175 | static int printed_version; | 175 | static int printed_version; |
176 | const struct ata_port_info *ppi[] = { &sch_port_info, NULL }; | 176 | const struct ata_port_info *ppi[] = { &sch_port_info, NULL }; |
177 | struct ata_host *host; | ||
178 | int rc; | ||
179 | 177 | ||
180 | if (!printed_version++) | 178 | if (!printed_version++) |
181 | dev_printk(KERN_DEBUG, &pdev->dev, | 179 | dev_printk(KERN_DEBUG, &pdev->dev, |
182 | "version " DRV_VERSION "\n"); | 180 | "version " DRV_VERSION "\n"); |
183 | 181 | ||
184 | /* enable device and prepare host */ | 182 | return ata_pci_sff_init_one(pdev, ppi, &sch_sht, NULL, 0); |
185 | rc = pcim_enable_device(pdev); | ||
186 | if (rc) | ||
187 | return rc; | ||
188 | rc = ata_pci_sff_prepare_host(pdev, ppi, &host); | ||
189 | if (rc) | ||
190 | return rc; | ||
191 | pci_set_master(pdev); | ||
192 | return ata_pci_sff_activate_host(host, ata_sff_interrupt, &sch_sht); | ||
193 | } | 183 | } |
194 | 184 | ||
195 | static int __init sch_init(void) | 185 | static int __init sch_init(void) |