aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ppc
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2007-03-03 11:48:54 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-03-03 11:48:54 -0500
commit9e5755bce00bb563739aeb0f09932a1907521167 (patch)
tree4a16eb1f094f3e5df3eed09870dd0cffb9cf1143 /drivers/ide/ppc
parented89616786d47093525a5dc039b1f502f5ada954 (diff)
ide: fix pmac breakage
Fix breakage added in the IDE devel tree. Add header, then fix drivers/ide/ppc/pmac.c: In function `pmac_ide_setup_dma': drivers/ide/ppc/pmac.c:2044: warning: assignment from incompatible pointer type drivers/ide/ppc/pmac.c: In function `pmac_ide_dma_host_on': drivers/ide/ppc/pmac.c:1989: warning: control reaches end of non-void function include/linux/pci.h: In function `pmac_ide_init': drivers/ide/ppc/pmac.c:1563: warning: ignoring return value of `pci_register_driver', declared with attribute warn_unused_result Then add some apparently-long-missing error handling. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ppc')
-rw-r--r--drivers/ide/ppc/pmac.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 395d35253d5..071a030ec26 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -48,7 +48,7 @@
48#include <asm/mediabay.h> 48#include <asm/mediabay.h>
49#endif 49#endif
50 50
51#include "ide-timing.h" 51#include "../ide-timing.h"
52 52
53#undef IDE_PMAC_DEBUG 53#undef IDE_PMAC_DEBUG
54 54
@@ -1551,19 +1551,34 @@ static struct pci_driver pmac_ide_pci_driver = {
1551}; 1551};
1552MODULE_DEVICE_TABLE(pci, pmac_ide_pci_match); 1552MODULE_DEVICE_TABLE(pci, pmac_ide_pci_match);
1553 1553
1554void __init 1554int __init pmac_ide_probe(void)
1555pmac_ide_probe(void)
1556{ 1555{
1556 int error;
1557
1557 if (!machine_is(powermac)) 1558 if (!machine_is(powermac))
1558 return; 1559 return -ENODEV;
1559 1560
1560#ifdef CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST 1561#ifdef CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST
1561 pci_register_driver(&pmac_ide_pci_driver); 1562 error = pci_register_driver(&pmac_ide_pci_driver);
1562 macio_register_driver(&pmac_ide_macio_driver); 1563 if (error)
1564 goto out;
1565 error = macio_register_driver(&pmac_ide_macio_driver);
1566 if (error) {
1567 pci_unregister_driver(&pmac_ide_pci_driver);
1568 goto out;
1569 }
1563#else 1570#else
1564 macio_register_driver(&pmac_ide_macio_driver); 1571 error = macio_register_driver(&pmac_ide_macio_driver);
1565 pci_register_driver(&pmac_ide_pci_driver); 1572 if (error)
1573 goto out;
1574 error = pci_register_driver(&pmac_ide_pci_driver);
1575 if (error) {
1576 macio_unregister_driver(&pmac_ide_macio_driver);
1577 goto out;
1578 }
1566#endif 1579#endif
1580out:
1581 return error;
1567} 1582}
1568 1583
1569#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC 1584#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
@@ -1983,7 +1998,7 @@ static void pmac_ide_dma_host_off(ide_drive_t *drive)
1983{ 1998{
1984} 1999}
1985 2000
1986static int pmac_ide_dma_host_on(ide_drive_t *drive) 2001static void pmac_ide_dma_host_on(ide_drive_t *drive)
1987{ 2002{
1988} 2003}
1989 2004