Commit 9287f9c3 authored by Tejun Heo's avatar Tejun Heo Committed by Bartlomiej Zolnierkiewicz

[ide] cleanup piix

In drivers/ide/pci/piix.[hc], init_setup_piix() is defined and
used but only one init_setup function is defined and no
demultiplexing is done using init_setup callback.  As other
drivers call ide_setup_pci_device() directly in such cases,
this patch removes init_setup_piix() and makes piix_init_one()
call ide_setup_pci_device() directly.
Signed-off-by: default avatarTejun Heo <tj@home-tj.org>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 109274a4
......@@ -530,20 +530,6 @@ static void __devinit init_hwif_piix(ide_hwif_t *hwif)
hwif->drives[0].autodma = hwif->autodma;
}
/**
* init_setup_piix - callback for IDE initialize
* @dev: PIIX PCI device
* @d: IDE pci info
*
* Enable the xp fixup for the PIIX controller and then perform
* a standard ide PCI setup
*/
static int __devinit init_setup_piix(struct pci_dev *dev, ide_pci_device_t *d)
{
return ide_setup_pci_device(dev, d);
}
/**
* piix_init_one - called when a PIIX is found
* @dev: the piix device
......@@ -557,7 +543,7 @@ static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_
{
ide_pci_device_t *d = &piix_pci_info[id->driver_data];
return d->init_setup(dev, d);
return ide_setup_pci_device(dev, d);
}
/**
......
......@@ -5,14 +5,12 @@
#include <linux/pci.h>
#include <linux/ide.h>
static int init_setup_piix(struct pci_dev *, ide_pci_device_t *);
static unsigned int __devinit init_chipset_piix(struct pci_dev *, const char *);
static void init_hwif_piix(ide_hwif_t *);
#define DECLARE_PIIX_DEV(name_str) \
{ \
.name = name_str, \
.init_setup = init_setup_piix, \
.init_chipset = init_chipset_piix, \
.init_hwif = init_hwif_piix, \
.channels = 2, \
......@@ -32,7 +30,6 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
{ /* 2 */
.name = "MPIIX",
.init_setup = init_setup_piix,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = NODMA,
......
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