From: Geert Uytterhoeven Date: Thu, 17 Jul 2008 19:16:10 +0000 (+0200) Subject: m68k: Return -ENODEV if no device is found X-Git-Tag: v2.6.27-rc1~997 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e945b568e28b42de893ef24989372f0219501d32;p=linux-2.6 m68k: Return -ENODEV if no device is found According to the tests in do_initcalls(), the proper error code in case no device is found is -ENODEV, not -ENXIO or -EIO. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds --- diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index 424995073c..49f274197b 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c @@ -1880,11 +1880,11 @@ static int __init atari_floppy_init (void) if (!MACH_IS_ATARI) /* Amiga, Mac, ... don't have Atari-compatible floppy :-) */ - return -ENXIO; + return -ENODEV; if (MACH_IS_HADES) /* Hades doesn't have Atari-compatible floppy */ - return -ENXIO; + return -ENODEV; if (register_blkdev(FLOPPY_MAJOR,"fd")) return -EBUSY; diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 197cd7a0c3..a22662b6a1 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -444,7 +444,7 @@ nvram_init(void) /* First test whether the driver should init at all */ if (!CHECK_DRIVER_INIT()) - return -ENXIO; + return -ENODEV; ret = misc_register(&nvram_dev); if (ret) { diff --git a/drivers/input/keyboard/atakbd.c b/drivers/input/keyboard/atakbd.c index 4e92100c56..1839194ea9 100644 --- a/drivers/input/keyboard/atakbd.c +++ b/drivers/input/keyboard/atakbd.c @@ -220,7 +220,7 @@ static int __init atakbd_init(void) int i, error; if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP)) - return -EIO; + return -ENODEV; // need to init core driver if not already done so if (atari_keyb_init()) diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index dff35474b8..c8605730a1 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c @@ -3110,7 +3110,7 @@ int __init atafb_init(void) printk("atafb_init: start\n"); if (!MACH_IS_ATARI) - return -ENXIO; + return -ENODEV; do { #ifdef ATAFB_EXT