LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kyle McMartin <kyle@mcmartin.ca>
To: linuxppc-dev@ozlabs.org
Cc: linux-ide@vger.kernel.org
Subject: [PATCH] fix swim3.c modular build
Date: Mon, 11 Feb 2008 17:45:05 -0500	[thread overview]
Message-ID: <20080211224505.GI4516@phobos.i.cabal.ca> (raw)

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)

                 reply	other threads:[~2008-02-11 22:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080211224505.GI4516@phobos.i.cabal.ca \
    --to=kyle@mcmartin.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox