Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9e5755bce00bb563739aeb0f09932a1907521167
Commit:     9e5755bce00bb563739aeb0f09932a1907521167
Parent:     ed89616786d47093525a5dc039b1f502f5ada954
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Sat Mar 3 17:48:54 2007 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Mar 3 17:48:54 2007 +0100

    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 <[EMAIL PROTECTED]>
    Cc: Paul Mackerras <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide.c      |    4 ++--
 drivers/ide/ppc/pmac.c |   33 ++++++++++++++++++++++++---------
 2 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index b3c0818..2548769 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1840,8 +1840,8 @@ static void __init probe_for_hwifs (void)
 #endif /* CONFIG_BLK_DEV_CMD640 */
 #ifdef CONFIG_BLK_DEV_IDE_PMAC
        {
-               extern void pmac_ide_probe(void);
-               pmac_ide_probe();
+               extern int pmac_ide_probe(void);
+               (void)pmac_ide_probe();
        }
 #endif /* CONFIG_BLK_DEV_IDE_PMAC */
 #ifdef CONFIG_BLK_DEV_GAYLE
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 395d352..071a030 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -48,7 +48,7 @@
 #include <asm/mediabay.h>
 #endif
 
-#include "ide-timing.h"
+#include "../ide-timing.h"
 
 #undef IDE_PMAC_DEBUG
 
@@ -1551,19 +1551,34 @@ static struct pci_driver pmac_ide_pci_driver = {
 };
 MODULE_DEVICE_TABLE(pci, pmac_ide_pci_match);
 
-void __init
-pmac_ide_probe(void)
+int __init pmac_ide_probe(void)
 {
+       int error;
+
        if (!machine_is(powermac))
-               return;
+               return -ENODEV;
 
 #ifdef CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST
-       pci_register_driver(&pmac_ide_pci_driver);
-       macio_register_driver(&pmac_ide_macio_driver);
+       error = pci_register_driver(&pmac_ide_pci_driver);
+       if (error)
+               goto out;
+       error = macio_register_driver(&pmac_ide_macio_driver);
+       if (error) {
+               pci_unregister_driver(&pmac_ide_pci_driver);
+               goto out;
+       }
 #else
-       macio_register_driver(&pmac_ide_macio_driver);
-       pci_register_driver(&pmac_ide_pci_driver);
+       error = macio_register_driver(&pmac_ide_macio_driver);
+       if (error)
+               goto out;
+       error = pci_register_driver(&pmac_ide_pci_driver);
+       if (error) {
+               macio_unregister_driver(&pmac_ide_macio_driver);
+               goto out;
+       }
 #endif
+out:
+       return error;
 }
 
 #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
@@ -1983,7 +1998,7 @@ static void pmac_ide_dma_host_off(ide_drive_t *drive)
 {
 }
 
-static int pmac_ide_dma_host_on(ide_drive_t *drive)
+static void pmac_ide_dma_host_on(ide_drive_t *drive)
 {
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to