LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix swim3.c modular build
@ 2008-02-11 22:45 Kyle McMartin
  0 siblings, 0 replies; only message in thread
From: Kyle McMartin @ 2008-02-11 22:45 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-ide

While updating Fedora to 2.6.25-rc1, I noticed this little gem...

This swim3 and mediabay dependancy is pretty grody. Commit
34394e45c3387bd66619d9a51b4be507e4222b02 moved the ifdef around, which
meant the EXPORT_SYMBOL wasn't happening, which was bad, since if swim3
is built modularly, and CONFIG_PMAC_MEDIABAY is defined the internal
replacement isn't used.

Anyway, a powerpc person should probably look at making this less than
completely broken, but at least it will now build.

I'm not entirely sure why this is conditional at all, really.

diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index 9367882..635a140 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -416,9 +416,9 @@ static void poll_media_bay(struct media_bay_info* bay)
 	}
 }
 
-#ifdef CONFIG_MAC_FLOPPY
 int check_media_bay(struct device_node *which_bay, int what)
 {
+#ifdef CONFIG_MAC_FLOPPY
 	int	i;
 
 	for (i=0; i<media_bay_count; i++)
@@ -428,10 +428,10 @@ int check_media_bay(struct device_node *which_bay, int what)
 			media_bays[i].cd_index = -1;
 			return -EINVAL;
 		}
+#endif /* CONFIG_MAC_FLOPPY */
 	return -ENODEV;
 }
 EXPORT_SYMBOL(check_media_bay);
-#endif /* CONFIG_MAC_FLOPPY */
 
 #ifdef CONFIG_BLK_DEV_IDE_PMAC
 int check_media_bay_by_base(unsigned long base, int what)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-11 22:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 22:45 [PATCH] fix swim3.c modular build Kyle McMartin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox