]> git.pld-linux.org Git - packages/kernel.git/blob - linux-2.6-ppc-mediabay.patch
- 2.6.27.8 [CVE-2008-5300]
[packages/kernel.git] / linux-2.6-ppc-mediabay.patch
1 diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
2 index c34bdf8..818aba3 100644
3 --- a/drivers/macintosh/mediabay.c
4 +++ b/drivers/macintosh/mediabay.c
5 @@ -84,7 +84,7 @@ struct media_bay_info {
6         int                             cd_irq;
7         int                             cd_retry;
8  #endif
9 -#if defined(CONFIG_BLK_DEV_IDE_PMAC) || defined(CONFIG_MAC_FLOPPY)
10 +#if defined(CONFIG_BLK_DEV_IDE_PMAC)
11         int                             cd_index;
12  #endif
13  };
14 @@ -417,6 +417,7 @@ static void poll_media_bay(struct media_bay_info* bay)
15         }
16  }
17  
18 +#ifdef CONFIG_BLK_DEV_IDE_PMAC
19  int check_media_bay(struct device_node *which_bay, int what)
20  {
21         int     i;
22 @@ -432,7 +433,6 @@ int check_media_bay(struct device_node *which_bay, int what)
23  }
24  EXPORT_SYMBOL(check_media_bay);
25  
26 -#ifdef CONFIG_BLK_DEV_IDE_PMAC
27  int check_media_bay_by_base(unsigned long base, int what)
28  {
29         int     i;
30 diff --git a/include/asm-powerpc/mediabay.h b/include/asm-powerpc/mediabay.h
31 index df111c3..b2efb33 100644
32 --- a/include/asm-powerpc/mediabay.h
33 +++ b/include/asm-powerpc/mediabay.h
34 @@ -17,15 +17,25 @@
35  #define MB_POWER       6       /* media bay contains a Power device (???) */
36  #define MB_NO          7       /* media bay contains nothing */
37  
38 -int check_media_bay(struct device_node *which_bay, int what);
39 -
40  /* Number of bays in the machine or 0 */
41  extern int media_bay_count;
42  
43 +#ifdef CONFIG_BLK_DEV_IDE_PMAC
44 +int check_media_bay(struct device_node *which_bay, int what);
45 +
46  int check_media_bay_by_base(unsigned long base, int what);
47  /* called by IDE PMAC host driver to register IDE controller for media bay */
48  int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base,
49                             int irq, int index);
50  
51 +#else
52 +
53 +static inline int check_media_bay(struct device_node *which_bay, int what)
54 +{
55 +       return -ENODEV;
56 +}
57 +
58 +#endif
59 +
60  #endif /* __KERNEL__ */
61  #endif /* _PPC_MEDIABAY_H */
This page took 0.026783 seconds and 3 git commands to generate.