Message ID | 200904212104.14665.bzolnier@gmail.com (mailing list archive) |
---|---|
State | Rejected, archived |
Headers | show |
Bartlomiej Zolnierkiewicz writes: > mediabay shouldn't include <linux/ide.h> unconditionally so > remove the superfluous include from mediabay.c (<asm/mediabay.h> > will pull <linux/ide.h> in for CONFIG_BLK_DEV_IDE_PMAC=y). I don't like relying on second-hand imports like that. I prefer the previous patch, that made mediabay depend on CONFIG_BLOCK. BTW, if including <linux/ide.h> causes an error when CONFIG_BLOCK=n, then there is a bug in <linux/ide.h>, IMO. Paul.
On Wednesday 22 April 2009 05:59:27 Paul Mackerras wrote: > Bartlomiej Zolnierkiewicz writes: > > > mediabay shouldn't include <linux/ide.h> unconditionally so > > remove the superfluous include from mediabay.c (<asm/mediabay.h> > > will pull <linux/ide.h> in for CONFIG_BLK_DEV_IDE_PMAC=y). > > I don't like relying on second-hand imports like that. I prefer the > previous patch, that made mediabay depend on CONFIG_BLOCK. I missed it somehow... OK, I found it now and it should fix the problem as well. > BTW, if including <linux/ide.h> causes an error when CONFIG_BLOCK=n, > then there is a bug in <linux/ide.h>, IMO. <linux/ide.h> is for drivers/ide only. mediabay lacks proper abstraction layer and is probably the only abuser left. Besides being a build fix my patch is a right step in cleaning this mess so I'm going to apply it through ide tree. Thanks, Bart
Index: b/drivers/macintosh/mediabay.c =================================================================== --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c @@ -18,7 +18,6 @@ #include <linux/timer.h> #include <linux/stddef.h> #include <linux/init.h> -#include <linux/ide.h> #include <linux/kthread.h> #include <linux/mutex.h> #include <asm/prom.h>