Skip to contentSkip to conversation

fix swim3.c modular build

PATCH New Kyle McMartin 1 participant 1 message Feb 11, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix swim3.c modular build

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.

drivers/macintosh/mediabay.c +2 -2
index 9367882..635a140 100644
@@ -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)