Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb732d7b authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

[PATCH] ide: fix crashes with hotplug serverworks



You can't install the base kernel on a Stratus box because of the overuse of
__init.  Affects both IDE layers identically.  It isn't the only misuser of
__init so more review of other drivers (or fixing ide_register code to know
about hotplug v non-hotplug chipsets) would be good.

Original issue found by Stratus and their patch was the inspiration for this
trivial one.

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Acked-by: default avatarBartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b39b01ff
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -442,7 +442,7 @@ static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const cha
	return (dev->irq) ? dev->irq : 0;
	return (dev->irq) ? dev->irq : 0;
}
}


static unsigned int __init ata66_svwks_svwks (ide_hwif_t *hwif)
static unsigned int __devinit ata66_svwks_svwks (ide_hwif_t *hwif)
{
{
	return 1;
	return 1;
}
}
@@ -454,7 +454,7 @@ static unsigned int __init ata66_svwks_svwks (ide_hwif_t *hwif)
 * Bit 14 clear = primary IDE channel does not have 80-pin cable.
 * Bit 14 clear = primary IDE channel does not have 80-pin cable.
 * Bit 14 set   = primary IDE channel has 80-pin cable.
 * Bit 14 set   = primary IDE channel has 80-pin cable.
 */
 */
static unsigned int __init ata66_svwks_dell (ide_hwif_t *hwif)
static unsigned int __devinit ata66_svwks_dell (ide_hwif_t *hwif)
{
{
	struct pci_dev *dev = hwif->pci_dev;
	struct pci_dev *dev = hwif->pci_dev;
	if (dev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
	if (dev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
@@ -472,7 +472,7 @@ static unsigned int __init ata66_svwks_dell (ide_hwif_t *hwif)
 *
 *
 * WARNING: this only works on Alpine hardware!
 * WARNING: this only works on Alpine hardware!
 */
 */
static unsigned int __init ata66_svwks_cobalt (ide_hwif_t *hwif)
static unsigned int __devinit ata66_svwks_cobalt (ide_hwif_t *hwif)
{
{
	struct pci_dev *dev = hwif->pci_dev;
	struct pci_dev *dev = hwif->pci_dev;
	if (dev->subsystem_vendor == PCI_VENDOR_ID_SUN &&
	if (dev->subsystem_vendor == PCI_VENDOR_ID_SUN &&
@@ -483,7 +483,7 @@ static unsigned int __init ata66_svwks_cobalt (ide_hwif_t *hwif)
	return 0;
	return 0;
}
}


static unsigned int __init ata66_svwks (ide_hwif_t *hwif)
static unsigned int __devinit ata66_svwks (ide_hwif_t *hwif)
{
{
	struct pci_dev *dev = hwif->pci_dev;
	struct pci_dev *dev = hwif->pci_dev;


@@ -573,7 +573,7 @@ static int __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
	return ide_setup_pci_device(dev, d);
	return ide_setup_pci_device(dev, d);
}
}


static int __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
static int __devinit init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
{
{
	if (!(PCI_FUNC(dev->devfn) & 1)) {
	if (!(PCI_FUNC(dev->devfn) & 1)) {
		d->bootable = NEVER_BOARD;
		d->bootable = NEVER_BOARD;