aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Loeliger <linuxppc@jdl.com>2005-09-17 11:36:54 -0400
committerPaul Mackerras <paulus@samba.org>2005-09-18 19:38:49 -0400
commitaacaf9bd9646f6f611a08fca976411b6e5ddefe2 (patch)
tree604853646cc176c0a0908db39f254285121fa50c
parentf495a8bfd6a52cf32859f93d5320bb234d8a9560 (diff)
[PATCH] powerpc: Remove sections use from ppc64 and drivers
Here is a new patch that removes all notion of the pmac, prep, chrp and openfirmware initialization sections, and then unifies the sections.h files without those __pmac, etc, sections identifiers cluttering things up. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/ppc64/kernel/pmac_feature.c60
-rw-r--r--arch/ppc64/kernel/pmac_nvram.c30
-rw-r--r--arch/ppc64/kernel/pmac_pci.c12
-rw-r--r--arch/ppc64/kernel/pmac_setup.c10
-rw-r--r--arch/ppc64/kernel/pmac_smp.c2
-rw-r--r--arch/ppc64/kernel/pmac_time.c4
-rw-r--r--drivers/ide/ppc/pmac.c80
-rw-r--r--drivers/macintosh/ans-lcd.c10
-rw-r--r--drivers/macintosh/mediabay.c56
-rw-r--r--drivers/macintosh/via-cuda.c1
-rw-r--r--drivers/macintosh/via-pmu.c129
-rw-r--r--drivers/macintosh/via-pmu68k.c15
12 files changed, 203 insertions, 206 deletions
diff --git a/arch/ppc64/kernel/pmac_feature.c b/arch/ppc64/kernel/pmac_feature.c
index eb4e6c3f694d..26075f11db77 100644
--- a/arch/ppc64/kernel/pmac_feature.c
+++ b/arch/ppc64/kernel/pmac_feature.c
@@ -53,7 +53,7 @@
53 * We use a single global lock to protect accesses. Each driver has 53 * We use a single global lock to protect accesses. Each driver has
54 * to take care of its own locking 54 * to take care of its own locking
55 */ 55 */
56static DEFINE_SPINLOCK(feature_lock __pmacdata); 56static DEFINE_SPINLOCK(feature_lock);
57 57
58#define LOCK(flags) spin_lock_irqsave(&feature_lock, flags); 58#define LOCK(flags) spin_lock_irqsave(&feature_lock, flags);
59#define UNLOCK(flags) spin_unlock_irqrestore(&feature_lock, flags); 59#define UNLOCK(flags) spin_unlock_irqrestore(&feature_lock, flags);
@@ -62,9 +62,9 @@ static DEFINE_SPINLOCK(feature_lock __pmacdata);
62/* 62/*
63 * Instance of some macio stuffs 63 * Instance of some macio stuffs
64 */ 64 */
65struct macio_chip macio_chips[MAX_MACIO_CHIPS] __pmacdata; 65struct macio_chip macio_chips[MAX_MACIO_CHIPS] ;
66 66
67struct macio_chip* __pmac macio_find(struct device_node* child, int type) 67struct macio_chip* macio_find(struct device_node* child, int type)
68{ 68{
69 while(child) { 69 while(child) {
70 int i; 70 int i;
@@ -79,7 +79,7 @@ struct macio_chip* __pmac macio_find(struct device_node* child, int type)
79} 79}
80EXPORT_SYMBOL_GPL(macio_find); 80EXPORT_SYMBOL_GPL(macio_find);
81 81
82static const char* macio_names[] __pmacdata = 82static const char* macio_names[] =
83{ 83{
84 "Unknown", 84 "Unknown",
85 "Grand Central", 85 "Grand Central",
@@ -106,9 +106,9 @@ static const char* macio_names[] __pmacdata =
106#define UN_BIS(r,v) (UN_OUT((r), UN_IN(r) | (v))) 106#define UN_BIS(r,v) (UN_OUT((r), UN_IN(r) | (v)))
107#define UN_BIC(r,v) (UN_OUT((r), UN_IN(r) & ~(v))) 107#define UN_BIC(r,v) (UN_OUT((r), UN_IN(r) & ~(v)))
108 108
109static struct device_node* uninorth_node __pmacdata; 109static struct device_node* uninorth_node;
110static u32* uninorth_base __pmacdata; 110static u32* uninorth_base;
111static u32 uninorth_rev __pmacdata; 111static u32 uninorth_rev;
112static void *u3_ht; 112static void *u3_ht;
113 113
114extern struct device_node *k2_skiplist[2]; 114extern struct device_node *k2_skiplist[2];
@@ -133,14 +133,14 @@ struct pmac_mb_def
133 struct feature_table_entry* features; 133 struct feature_table_entry* features;
134 unsigned long board_flags; 134 unsigned long board_flags;
135}; 135};
136static struct pmac_mb_def pmac_mb __pmacdata; 136static struct pmac_mb_def pmac_mb;
137 137
138/* 138/*
139 * Here are the chip specific feature functions 139 * Here are the chip specific feature functions
140 */ 140 */
141 141
142 142
143static long __pmac g5_read_gpio(struct device_node* node, long param, long value) 143static long g5_read_gpio(struct device_node* node, long param, long value)
144{ 144{
145 struct macio_chip* macio = &macio_chips[0]; 145 struct macio_chip* macio = &macio_chips[0];
146 146
@@ -148,7 +148,7 @@ static long __pmac g5_read_gpio(struct device_node* node, long param, long value
148} 148}
149 149
150 150
151static long __pmac g5_write_gpio(struct device_node* node, long param, long value) 151static long g5_write_gpio(struct device_node* node, long param, long value)
152{ 152{
153 struct macio_chip* macio = &macio_chips[0]; 153 struct macio_chip* macio = &macio_chips[0];
154 154
@@ -156,7 +156,7 @@ static long __pmac g5_write_gpio(struct device_node* node, long param, long valu
156 return 0; 156 return 0;
157} 157}
158 158
159static long __pmac g5_gmac_enable(struct device_node* node, long param, long value) 159static long g5_gmac_enable(struct device_node* node, long param, long value)
160{ 160{
161 struct macio_chip* macio = &macio_chips[0]; 161 struct macio_chip* macio = &macio_chips[0];
162 unsigned long flags; 162 unsigned long flags;
@@ -181,7 +181,7 @@ static long __pmac g5_gmac_enable(struct device_node* node, long param, long val
181 return 0; 181 return 0;
182} 182}
183 183
184static long __pmac g5_fw_enable(struct device_node* node, long param, long value) 184static long g5_fw_enable(struct device_node* node, long param, long value)
185{ 185{
186 struct macio_chip* macio = &macio_chips[0]; 186 struct macio_chip* macio = &macio_chips[0];
187 unsigned long flags; 187 unsigned long flags;
@@ -206,7 +206,7 @@ static long __pmac g5_fw_enable(struct device_node* node, long param, long value
206 return 0; 206 return 0;
207} 207}
208 208
209static long __pmac g5_mpic_enable(struct device_node* node, long param, long value) 209static long g5_mpic_enable(struct device_node* node, long param, long value)
210{ 210{
211 unsigned long flags; 211 unsigned long flags;
212 212
@@ -220,7 +220,7 @@ static long __pmac g5_mpic_enable(struct device_node* node, long param, long val
220 return 0; 220 return 0;
221} 221}
222 222
223static long __pmac g5_eth_phy_reset(struct device_node* node, long param, long value) 223static long g5_eth_phy_reset(struct device_node* node, long param, long value)
224{ 224{
225 struct macio_chip* macio = &macio_chips[0]; 225 struct macio_chip* macio = &macio_chips[0];
226 struct device_node *phy; 226 struct device_node *phy;
@@ -250,7 +250,7 @@ static long __pmac g5_eth_phy_reset(struct device_node* node, long param, long v
250 return 0; 250 return 0;
251} 251}
252 252
253static long __pmac g5_i2s_enable(struct device_node *node, long param, long value) 253static long g5_i2s_enable(struct device_node *node, long param, long value)
254{ 254{
255 /* Very crude implementation for now */ 255 /* Very crude implementation for now */
256 struct macio_chip* macio = &macio_chips[0]; 256 struct macio_chip* macio = &macio_chips[0];
@@ -275,7 +275,7 @@ static long __pmac g5_i2s_enable(struct device_node *node, long param, long valu
275 275
276 276
277#ifdef CONFIG_SMP 277#ifdef CONFIG_SMP
278static long __pmac g5_reset_cpu(struct device_node* node, long param, long value) 278static long g5_reset_cpu(struct device_node* node, long param, long value)
279{ 279{
280 unsigned int reset_io = 0; 280 unsigned int reset_io = 0;
281 unsigned long flags; 281 unsigned long flags;
@@ -320,12 +320,12 @@ static long __pmac g5_reset_cpu(struct device_node* node, long param, long value
320 * This takes the second CPU off the bus on dual CPU machines 320 * This takes the second CPU off the bus on dual CPU machines
321 * running UP 321 * running UP
322 */ 322 */
323void __pmac g5_phy_disable_cpu1(void) 323void g5_phy_disable_cpu1(void)
324{ 324{
325 UN_OUT(U3_API_PHY_CONFIG_1, 0); 325 UN_OUT(U3_API_PHY_CONFIG_1, 0);
326} 326}
327 327
328static long __pmac generic_get_mb_info(struct device_node* node, long param, long value) 328static long generic_get_mb_info(struct device_node* node, long param, long value)
329{ 329{
330 switch(param) { 330 switch(param) {
331 case PMAC_MB_INFO_MODEL: 331 case PMAC_MB_INFO_MODEL:
@@ -347,14 +347,14 @@ static long __pmac generic_get_mb_info(struct device_node* node, long param, lon
347 347
348/* Used on any machine 348/* Used on any machine
349 */ 349 */
350static struct feature_table_entry any_features[] __pmacdata = { 350static struct feature_table_entry any_features[] = {
351 { PMAC_FTR_GET_MB_INFO, generic_get_mb_info }, 351 { PMAC_FTR_GET_MB_INFO, generic_get_mb_info },
352 { 0, NULL } 352 { 0, NULL }
353}; 353};
354 354
355/* G5 features 355/* G5 features
356 */ 356 */
357static struct feature_table_entry g5_features[] __pmacdata = { 357static struct feature_table_entry g5_features[] = {
358 { PMAC_FTR_GMAC_ENABLE, g5_gmac_enable }, 358 { PMAC_FTR_GMAC_ENABLE, g5_gmac_enable },
359 { PMAC_FTR_1394_ENABLE, g5_fw_enable }, 359 { PMAC_FTR_1394_ENABLE, g5_fw_enable },
360 { PMAC_FTR_ENABLE_MPIC, g5_mpic_enable }, 360 { PMAC_FTR_ENABLE_MPIC, g5_mpic_enable },
@@ -368,7 +368,7 @@ static struct feature_table_entry g5_features[] __pmacdata = {
368 { 0, NULL } 368 { 0, NULL }
369}; 369};
370 370
371static struct pmac_mb_def pmac_mb_defs[] __pmacdata = { 371static struct pmac_mb_def pmac_mb_defs[] = {
372 { "PowerMac7,2", "PowerMac G5", 372 { "PowerMac7,2", "PowerMac G5",
373 PMAC_TYPE_POWERMAC_G5, g5_features, 373 PMAC_TYPE_POWERMAC_G5, g5_features,
374 0, 374 0,
@@ -394,7 +394,7 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = {
394/* 394/*
395 * The toplevel feature_call callback 395 * The toplevel feature_call callback
396 */ 396 */
397long __pmac pmac_do_feature_call(unsigned int selector, ...) 397long pmac_do_feature_call(unsigned int selector, ...)
398{ 398{
399 struct device_node* node; 399 struct device_node* node;
400 long param, value; 400 long param, value;
@@ -706,8 +706,8 @@ void __init pmac_check_ht_link(void)
706 * Early video resume hook 706 * Early video resume hook
707 */ 707 */
708 708
709static void (*pmac_early_vresume_proc)(void *data) __pmacdata; 709static void (*pmac_early_vresume_proc)(void *data);
710static void *pmac_early_vresume_data __pmacdata; 710static void *pmac_early_vresume_data;
711 711
712void pmac_set_early_video_resume(void (*proc)(void *data), void *data) 712void pmac_set_early_video_resume(void (*proc)(void *data), void *data)
713{ 713{
@@ -725,11 +725,11 @@ EXPORT_SYMBOL(pmac_set_early_video_resume);
725 * AGP related suspend/resume code 725 * AGP related suspend/resume code
726 */ 726 */
727 727
728static struct pci_dev *pmac_agp_bridge __pmacdata; 728static struct pci_dev *pmac_agp_bridge;
729static int (*pmac_agp_suspend)(struct pci_dev *bridge) __pmacdata; 729static int (*pmac_agp_suspend)(struct pci_dev *bridge);
730static int (*pmac_agp_resume)(struct pci_dev *bridge) __pmacdata; 730static int (*pmac_agp_resume)(struct pci_dev *bridge);
731 731
732void __pmac pmac_register_agp_pm(struct pci_dev *bridge, 732void pmac_register_agp_pm(struct pci_dev *bridge,
733 int (*suspend)(struct pci_dev *bridge), 733 int (*suspend)(struct pci_dev *bridge),
734 int (*resume)(struct pci_dev *bridge)) 734 int (*resume)(struct pci_dev *bridge))
735{ 735{
@@ -746,7 +746,7 @@ void __pmac pmac_register_agp_pm(struct pci_dev *bridge,
746} 746}
747EXPORT_SYMBOL(pmac_register_agp_pm); 747EXPORT_SYMBOL(pmac_register_agp_pm);
748 748
749void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev) 749void pmac_suspend_agp_for_card(struct pci_dev *dev)
750{ 750{
751 if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL) 751 if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL)
752 return; 752 return;
@@ -756,7 +756,7 @@ void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev)
756} 756}
757EXPORT_SYMBOL(pmac_suspend_agp_for_card); 757EXPORT_SYMBOL(pmac_suspend_agp_for_card);
758 758
759void __pmac pmac_resume_agp_for_card(struct pci_dev *dev) 759void pmac_resume_agp_for_card(struct pci_dev *dev)
760{ 760{
761 if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL) 761 if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL)
762 return; 762 return;
diff --git a/arch/ppc64/kernel/pmac_nvram.c b/arch/ppc64/kernel/pmac_nvram.c
index e32a902236e3..11586d535f81 100644
--- a/arch/ppc64/kernel/pmac_nvram.c
+++ b/arch/ppc64/kernel/pmac_nvram.c
@@ -82,10 +82,10 @@ extern int system_running;
82static int (*core99_write_bank)(int bank, u8* datas); 82static int (*core99_write_bank)(int bank, u8* datas);
83static int (*core99_erase_bank)(int bank); 83static int (*core99_erase_bank)(int bank);
84 84
85static char *nvram_image __pmacdata; 85static char *nvram_image;
86 86
87 87
88static ssize_t __pmac core99_nvram_read(char *buf, size_t count, loff_t *index) 88static ssize_t core99_nvram_read(char *buf, size_t count, loff_t *index)
89{ 89{
90 int i; 90 int i;
91 91
@@ -103,7 +103,7 @@ static ssize_t __pmac core99_nvram_read(char *buf, size_t count, loff_t *index)
103 return count; 103 return count;
104} 104}
105 105
106static ssize_t __pmac core99_nvram_write(char *buf, size_t count, loff_t *index) 106static ssize_t core99_nvram_write(char *buf, size_t count, loff_t *index)
107{ 107{
108 int i; 108 int i;
109 109
@@ -121,14 +121,14 @@ static ssize_t __pmac core99_nvram_write(char *buf, size_t count, loff_t *index)
121 return count; 121 return count;
122} 122}
123 123
124static ssize_t __pmac core99_nvram_size(void) 124static ssize_t core99_nvram_size(void)
125{ 125{
126 if (nvram_image == NULL) 126 if (nvram_image == NULL)
127 return -ENODEV; 127 return -ENODEV;
128 return NVRAM_SIZE; 128 return NVRAM_SIZE;
129} 129}
130 130
131static u8 __pmac chrp_checksum(struct chrp_header* hdr) 131static u8 chrp_checksum(struct chrp_header* hdr)
132{ 132{
133 u8 *ptr; 133 u8 *ptr;
134 u16 sum = hdr->signature; 134 u16 sum = hdr->signature;
@@ -139,7 +139,7 @@ static u8 __pmac chrp_checksum(struct chrp_header* hdr)
139 return sum; 139 return sum;
140} 140}
141 141
142static u32 __pmac core99_calc_adler(u8 *buffer) 142static u32 core99_calc_adler(u8 *buffer)
143{ 143{
144 int cnt; 144 int cnt;
145 u32 low, high; 145 u32 low, high;
@@ -161,7 +161,7 @@ static u32 __pmac core99_calc_adler(u8 *buffer)
161 return (high << 16) | low; 161 return (high << 16) | low;
162} 162}
163 163
164static u32 __pmac core99_check(u8* datas) 164static u32 core99_check(u8* datas)
165{ 165{
166 struct core99_header* hdr99 = (struct core99_header*)datas; 166 struct core99_header* hdr99 = (struct core99_header*)datas;
167 167
@@ -180,7 +180,7 @@ static u32 __pmac core99_check(u8* datas)
180 return hdr99->generation; 180 return hdr99->generation;
181} 181}
182 182
183static int __pmac sm_erase_bank(int bank) 183static int sm_erase_bank(int bank)
184{ 184{
185 int stat, i; 185 int stat, i;
186 unsigned long timeout; 186 unsigned long timeout;
@@ -212,7 +212,7 @@ static int __pmac sm_erase_bank(int bank)
212 return 0; 212 return 0;
213} 213}
214 214
215static int __pmac sm_write_bank(int bank, u8* datas) 215static int sm_write_bank(int bank, u8* datas)
216{ 216{
217 int i, stat = 0; 217 int i, stat = 0;
218 unsigned long timeout; 218 unsigned long timeout;
@@ -247,7 +247,7 @@ static int __pmac sm_write_bank(int bank, u8* datas)
247 return 0; 247 return 0;
248} 248}
249 249
250static int __pmac amd_erase_bank(int bank) 250static int amd_erase_bank(int bank)
251{ 251{
252 int i, stat = 0; 252 int i, stat = 0;
253 unsigned long timeout; 253 unsigned long timeout;
@@ -294,7 +294,7 @@ static int __pmac amd_erase_bank(int bank)
294 return 0; 294 return 0;
295} 295}
296 296
297static int __pmac amd_write_bank(int bank, u8* datas) 297static int amd_write_bank(int bank, u8* datas)
298{ 298{
299 int i, stat = 0; 299 int i, stat = 0;
300 unsigned long timeout; 300 unsigned long timeout;
@@ -341,7 +341,7 @@ static int __pmac amd_write_bank(int bank, u8* datas)
341} 341}
342 342
343 343
344static int __pmac core99_nvram_sync(void) 344static int core99_nvram_sync(void)
345{ 345{
346 struct core99_header* hdr99; 346 struct core99_header* hdr99;
347 unsigned long flags; 347 unsigned long flags;
@@ -431,7 +431,7 @@ int __init pmac_nvram_init(void)
431 return 0; 431 return 0;
432} 432}
433 433
434int __pmac pmac_get_partition(int partition) 434int pmac_get_partition(int partition)
435{ 435{
436 struct nvram_partition *part; 436 struct nvram_partition *part;
437 const char *name; 437 const char *name;
@@ -459,7 +459,7 @@ int __pmac pmac_get_partition(int partition)
459 return part->index; 459 return part->index;
460} 460}
461 461
462u8 __pmac pmac_xpram_read(int xpaddr) 462u8 pmac_xpram_read(int xpaddr)
463{ 463{
464 int offset = pmac_get_partition(pmac_nvram_XPRAM); 464 int offset = pmac_get_partition(pmac_nvram_XPRAM);
465 loff_t index; 465 loff_t index;
@@ -476,7 +476,7 @@ u8 __pmac pmac_xpram_read(int xpaddr)
476 return buf; 476 return buf;
477} 477}
478 478
479void __pmac pmac_xpram_write(int xpaddr, u8 data) 479void pmac_xpram_write(int xpaddr, u8 data)
480{ 480{
481 int offset = pmac_get_partition(pmac_nvram_XPRAM); 481 int offset = pmac_get_partition(pmac_nvram_XPRAM);
482 loff_t index; 482 loff_t index;
diff --git a/arch/ppc64/kernel/pmac_pci.c b/arch/ppc64/kernel/pmac_pci.c
index dc40a0cad0b4..1f61aa4746ec 100644
--- a/arch/ppc64/kernel/pmac_pci.c
+++ b/arch/ppc64/kernel/pmac_pci.c
@@ -121,7 +121,7 @@ static void __init fixup_bus_range(struct device_node *bridge)
121 |(((unsigned long)(off)) & 0xFCUL) \ 121 |(((unsigned long)(off)) & 0xFCUL) \
122 |1UL) 122 |1UL)
123 123
124static unsigned long __pmac macrisc_cfg_access(struct pci_controller* hose, 124static unsigned long macrisc_cfg_access(struct pci_controller* hose,
125 u8 bus, u8 dev_fn, u8 offset) 125 u8 bus, u8 dev_fn, u8 offset)
126{ 126{
127 unsigned int caddr; 127 unsigned int caddr;
@@ -142,7 +142,7 @@ static unsigned long __pmac macrisc_cfg_access(struct pci_controller* hose,
142 return ((unsigned long)hose->cfg_data) + offset; 142 return ((unsigned long)hose->cfg_data) + offset;
143} 143}
144 144
145static int __pmac macrisc_read_config(struct pci_bus *bus, unsigned int devfn, 145static int macrisc_read_config(struct pci_bus *bus, unsigned int devfn,
146 int offset, int len, u32 *val) 146 int offset, int len, u32 *val)
147{ 147{
148 struct pci_controller *hose; 148 struct pci_controller *hose;
@@ -173,7 +173,7 @@ static int __pmac macrisc_read_config(struct pci_bus *bus, unsigned int devfn,
173 return PCIBIOS_SUCCESSFUL; 173 return PCIBIOS_SUCCESSFUL;
174} 174}
175 175
176static int __pmac macrisc_write_config(struct pci_bus *bus, unsigned int devfn, 176static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn,
177 int offset, int len, u32 val) 177 int offset, int len, u32 val)
178{ 178{
179 struct pci_controller *hose; 179 struct pci_controller *hose;
@@ -265,7 +265,7 @@ static int u3_ht_skip_device(struct pci_controller *hose,
265 + (((unsigned long)bus) << 16) \ 265 + (((unsigned long)bus) << 16) \
266 + 0x01000000UL) 266 + 0x01000000UL)
267 267
268static unsigned long __pmac u3_ht_cfg_access(struct pci_controller* hose, 268static unsigned long u3_ht_cfg_access(struct pci_controller* hose,
269 u8 bus, u8 devfn, u8 offset) 269 u8 bus, u8 devfn, u8 offset)
270{ 270{
271 if (bus == hose->first_busno) { 271 if (bus == hose->first_busno) {
@@ -277,7 +277,7 @@ static unsigned long __pmac u3_ht_cfg_access(struct pci_controller* hose,
277 return ((unsigned long)hose->cfg_data) + U3_HT_CFA1(bus, devfn, offset); 277 return ((unsigned long)hose->cfg_data) + U3_HT_CFA1(bus, devfn, offset);
278} 278}
279 279
280static int __pmac u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, 280static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,
281 int offset, int len, u32 *val) 281 int offset, int len, u32 *val)
282{ 282{
283 struct pci_controller *hose; 283 struct pci_controller *hose;
@@ -327,7 +327,7 @@ static int __pmac u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,
327 return PCIBIOS_SUCCESSFUL; 327 return PCIBIOS_SUCCESSFUL;
328} 328}
329 329
330static int __pmac u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, 330static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
331 int offset, int len, u32 val) 331 int offset, int len, u32 val)
332{ 332{
333 struct pci_controller *hose; 333 struct pci_controller *hose;
diff --git a/arch/ppc64/kernel/pmac_setup.c b/arch/ppc64/kernel/pmac_setup.c
index 325426c7bed0..1f5118078f7d 100644
--- a/arch/ppc64/kernel/pmac_setup.c
+++ b/arch/ppc64/kernel/pmac_setup.c
@@ -98,7 +98,7 @@ EXPORT_SYMBOL(smu_cmdbuf_abs);
98 98
99extern void udbg_init_scc(struct device_node *np); 99extern void udbg_init_scc(struct device_node *np);
100 100
101static void __pmac pmac_show_cpuinfo(struct seq_file *m) 101static void pmac_show_cpuinfo(struct seq_file *m)
102{ 102{
103 struct device_node *np; 103 struct device_node *np;
104 char *pp; 104 char *pp;
@@ -210,7 +210,7 @@ static int pmac_late_init(void)
210late_initcall(pmac_late_init); 210late_initcall(pmac_late_init);
211 211
212/* can't be __init - can be called whenever a disk is first accessed */ 212/* can't be __init - can be called whenever a disk is first accessed */
213void __pmac note_bootable_part(dev_t dev, int part, int goodness) 213void note_bootable_part(dev_t dev, int part, int goodness)
214{ 214{
215 extern dev_t boot_dev; 215 extern dev_t boot_dev;
216 char *p; 216 char *p;
@@ -231,7 +231,7 @@ void __pmac note_bootable_part(dev_t dev, int part, int goodness)
231 } 231 }
232} 232}
233 233
234static void __pmac pmac_restart(char *cmd) 234static void pmac_restart(char *cmd)
235{ 235{
236 switch(sys_ctrler) { 236 switch(sys_ctrler) {
237#ifdef CONFIG_ADB_PMU 237#ifdef CONFIG_ADB_PMU
@@ -250,7 +250,7 @@ static void __pmac pmac_restart(char *cmd)
250 } 250 }
251} 251}
252 252
253static void __pmac pmac_power_off(void) 253static void pmac_power_off(void)
254{ 254{
255 switch(sys_ctrler) { 255 switch(sys_ctrler) {
256#ifdef CONFIG_ADB_PMU 256#ifdef CONFIG_ADB_PMU
@@ -268,7 +268,7 @@ static void __pmac pmac_power_off(void)
268 } 268 }
269} 269}
270 270
271static void __pmac pmac_halt(void) 271static void pmac_halt(void)
272{ 272{
273 pmac_power_off(); 273 pmac_power_off();
274} 274}
diff --git a/arch/ppc64/kernel/pmac_smp.c b/arch/ppc64/kernel/pmac_smp.c
index a23de37227bf..9fd23ea55bc9 100644
--- a/arch/ppc64/kernel/pmac_smp.c
+++ b/arch/ppc64/kernel/pmac_smp.c
@@ -310,7 +310,7 @@ static void __init smp_core99_setup_cpu(int cpu_nr)
310 } 310 }
311} 311}
312 312
313struct smp_ops_t core99_smp_ops __pmacdata = { 313struct smp_ops_t core99_smp_ops = {
314 .message_pass = smp_mpic_message_pass, 314 .message_pass = smp_mpic_message_pass,
315 .probe = smp_core99_probe, 315 .probe = smp_core99_probe,
316 .kick_cpu = smp_core99_kick_cpu, 316 .kick_cpu = smp_core99_kick_cpu,
diff --git a/arch/ppc64/kernel/pmac_time.c b/arch/ppc64/kernel/pmac_time.c
index 3059edb09cc8..6c8c99295e7a 100644
--- a/arch/ppc64/kernel/pmac_time.c
+++ b/arch/ppc64/kernel/pmac_time.c
@@ -51,7 +51,7 @@
51extern struct timezone sys_tz; 51extern struct timezone sys_tz;
52extern void to_tm(int tim, struct rtc_time * tm); 52extern void to_tm(int tim, struct rtc_time * tm);
53 53
54void __pmac pmac_get_rtc_time(struct rtc_time *tm) 54void pmac_get_rtc_time(struct rtc_time *tm)
55{ 55{
56 switch(sys_ctrler) { 56 switch(sys_ctrler) {
57#ifdef CONFIG_ADB_PMU 57#ifdef CONFIG_ADB_PMU
@@ -92,7 +92,7 @@ void __pmac pmac_get_rtc_time(struct rtc_time *tm)
92 } 92 }
93} 93}
94 94
95int __pmac pmac_set_rtc_time(struct rtc_time *tm) 95int pmac_set_rtc_time(struct rtc_time *tm)
96{ 96{
97 switch(sys_ctrler) { 97 switch(sys_ctrler) {
98#ifdef CONFIG_ADB_PMU 98#ifdef CONFIG_ADB_PMU
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 87d1f8a1f41e..d8c3d8ebad30 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -81,7 +81,7 @@ typedef struct pmac_ide_hwif {
81 81
82} pmac_ide_hwif_t; 82} pmac_ide_hwif_t;
83 83
84static pmac_ide_hwif_t pmac_ide[MAX_HWIFS] __pmacdata; 84static pmac_ide_hwif_t pmac_ide[MAX_HWIFS];
85static int pmac_ide_count; 85static int pmac_ide_count;
86 86
87enum { 87enum {
@@ -242,7 +242,7 @@ struct mdma_timings_t {
242 int cycleTime; 242 int cycleTime;
243}; 243};
244 244
245struct mdma_timings_t mdma_timings_33[] __pmacdata = 245struct mdma_timings_t mdma_timings_33[] =
246{ 246{
247 { 240, 240, 480 }, 247 { 240, 240, 480 },
248 { 180, 180, 360 }, 248 { 180, 180, 360 },
@@ -255,7 +255,7 @@ struct mdma_timings_t mdma_timings_33[] __pmacdata =
255 { 0, 0, 0 } 255 { 0, 0, 0 }
256}; 256};
257 257
258struct mdma_timings_t mdma_timings_33k[] __pmacdata = 258struct mdma_timings_t mdma_timings_33k[] =
259{ 259{
260 { 240, 240, 480 }, 260 { 240, 240, 480 },
261 { 180, 180, 360 }, 261 { 180, 180, 360 },
@@ -268,7 +268,7 @@ struct mdma_timings_t mdma_timings_33k[] __pmacdata =
268 { 0, 0, 0 } 268 { 0, 0, 0 }
269}; 269};
270 270
271struct mdma_timings_t mdma_timings_66[] __pmacdata = 271struct mdma_timings_t mdma_timings_66[] =
272{ 272{
273 { 240, 240, 480 }, 273 { 240, 240, 480 },
274 { 180, 180, 360 }, 274 { 180, 180, 360 },
@@ -286,7 +286,7 @@ struct {
286 int addrSetup; /* ??? */ 286 int addrSetup; /* ??? */
287 int rdy2pause; 287 int rdy2pause;
288 int wrDataSetup; 288 int wrDataSetup;
289} kl66_udma_timings[] __pmacdata = 289} kl66_udma_timings[] =
290{ 290{
291 { 0, 180, 120 }, /* Mode 0 */ 291 { 0, 180, 120 }, /* Mode 0 */
292 { 0, 150, 90 }, /* 1 */ 292 { 0, 150, 90 }, /* 1 */
@@ -301,7 +301,7 @@ struct kauai_timing {
301 u32 timing_reg; 301 u32 timing_reg;
302}; 302};
303 303
304static struct kauai_timing kauai_pio_timings[] __pmacdata = 304static struct kauai_timing kauai_pio_timings[] =
305{ 305{
306 { 930 , 0x08000fff }, 306 { 930 , 0x08000fff },
307 { 600 , 0x08000a92 }, 307 { 600 , 0x08000a92 },
@@ -316,7 +316,7 @@ static struct kauai_timing kauai_pio_timings[] __pmacdata =
316 { 120 , 0x04000148 } 316 { 120 , 0x04000148 }
317}; 317};
318 318
319static struct kauai_timing kauai_mdma_timings[] __pmacdata = 319static struct kauai_timing kauai_mdma_timings[] =
320{ 320{
321 { 1260 , 0x00fff000 }, 321 { 1260 , 0x00fff000 },
322 { 480 , 0x00618000 }, 322 { 480 , 0x00618000 },
@@ -330,7 +330,7 @@ static struct kauai_timing kauai_mdma_timings[] __pmacdata =
330 { 0 , 0 }, 330 { 0 , 0 },
331}; 331};
332 332
333static struct kauai_timing kauai_udma_timings[] __pmacdata = 333static struct kauai_timing kauai_udma_timings[] =
334{ 334{
335 { 120 , 0x000070c0 }, 335 { 120 , 0x000070c0 },
336 { 90 , 0x00005d80 }, 336 { 90 , 0x00005d80 },
@@ -341,7 +341,7 @@ static struct kauai_timing kauai_udma_timings[] __pmacdata =
341 { 0 , 0 }, 341 { 0 , 0 },
342}; 342};
343 343
344static struct kauai_timing shasta_pio_timings[] __pmacdata = 344static struct kauai_timing shasta_pio_timings[] =
345{ 345{
346 { 930 , 0x08000fff }, 346 { 930 , 0x08000fff },
347 { 600 , 0x0A000c97 }, 347 { 600 , 0x0A000c97 },
@@ -356,7 +356,7 @@ static struct kauai_timing shasta_pio_timings[] __pmacdata =
356 { 120 , 0x0400010a } 356 { 120 , 0x0400010a }
357}; 357};
358 358
359static struct kauai_timing shasta_mdma_timings[] __pmacdata = 359static struct kauai_timing shasta_mdma_timings[] =
360{ 360{
361 { 1260 , 0x00fff000 }, 361 { 1260 , 0x00fff000 },
362 { 480 , 0x00820800 }, 362 { 480 , 0x00820800 },
@@ -370,7 +370,7 @@ static struct kauai_timing shasta_mdma_timings[] __pmacdata =
370 { 0 , 0 }, 370 { 0 , 0 },
371}; 371};
372 372
373static struct kauai_timing shasta_udma133_timings[] __pmacdata = 373static struct kauai_timing shasta_udma133_timings[] =
374{ 374{
375 { 120 , 0x00035901, }, 375 { 120 , 0x00035901, },
376 { 90 , 0x000348b1, }, 376 { 90 , 0x000348b1, },
@@ -522,7 +522,7 @@ pmu_hd_blink_init(void)
522 * N.B. this can't be an initfunc, because the media-bay task can 522 * N.B. this can't be an initfunc, because the media-bay task can
523 * call ide_[un]register at any time. 523 * call ide_[un]register at any time.
524 */ 524 */
525void __pmac 525void
526pmac_ide_init_hwif_ports(hw_regs_t *hw, 526pmac_ide_init_hwif_ports(hw_regs_t *hw,
527 unsigned long data_port, unsigned long ctrl_port, 527 unsigned long data_port, unsigned long ctrl_port,
528 int *irq) 528 int *irq)
@@ -559,7 +559,7 @@ pmac_ide_init_hwif_ports(hw_regs_t *hw,
559 * timing register when selecting that unit. This version is for 559 * timing register when selecting that unit. This version is for
560 * ASICs with a single timing register 560 * ASICs with a single timing register
561 */ 561 */
562static void __pmac 562static void
563pmac_ide_selectproc(ide_drive_t *drive) 563pmac_ide_selectproc(ide_drive_t *drive)
564{ 564{
565 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data; 565 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data;
@@ -579,7 +579,7 @@ pmac_ide_selectproc(ide_drive_t *drive)
579 * timing register when selecting that unit. This version is for 579 * timing register when selecting that unit. This version is for
580 * ASICs with a dual timing register (Kauai) 580 * ASICs with a dual timing register (Kauai)
581 */ 581 */
582static void __pmac 582static void
583pmac_ide_kauai_selectproc(ide_drive_t *drive) 583pmac_ide_kauai_selectproc(ide_drive_t *drive)
584{ 584{
585 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data; 585 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data;
@@ -600,7 +600,7 @@ pmac_ide_kauai_selectproc(ide_drive_t *drive)
600/* 600/*
601 * Force an update of controller timing values for a given drive 601 * Force an update of controller timing values for a given drive
602 */ 602 */
603static void __pmac 603static void
604pmac_ide_do_update_timings(ide_drive_t *drive) 604pmac_ide_do_update_timings(ide_drive_t *drive)
605{ 605{
606 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data; 606 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data;
@@ -633,7 +633,7 @@ pmac_outbsync(ide_drive_t *drive, u8 value, unsigned long port)
633 * to sort that out sooner or later and see if I can finally get the 633 * to sort that out sooner or later and see if I can finally get the
634 * common version to work properly in all cases 634 * common version to work properly in all cases
635 */ 635 */
636static int __pmac 636static int
637pmac_ide_do_setfeature(ide_drive_t *drive, u8 command) 637pmac_ide_do_setfeature(ide_drive_t *drive, u8 command)
638{ 638{
639 ide_hwif_t *hwif = HWIF(drive); 639 ide_hwif_t *hwif = HWIF(drive);
@@ -710,7 +710,7 @@ out:
710/* 710/*
711 * Old tuning functions (called on hdparm -p), sets up drive PIO timings 711 * Old tuning functions (called on hdparm -p), sets up drive PIO timings
712 */ 712 */
713static void __pmac 713static void
714pmac_ide_tuneproc(ide_drive_t *drive, u8 pio) 714pmac_ide_tuneproc(ide_drive_t *drive, u8 pio)
715{ 715{
716 ide_pio_data_t d; 716 ide_pio_data_t d;
@@ -801,7 +801,7 @@ pmac_ide_tuneproc(ide_drive_t *drive, u8 pio)
801/* 801/*
802 * Calculate KeyLargo ATA/66 UDMA timings 802 * Calculate KeyLargo ATA/66 UDMA timings
803 */ 803 */
804static int __pmac 804static int
805set_timings_udma_ata4(u32 *timings, u8 speed) 805set_timings_udma_ata4(u32 *timings, u8 speed)
806{ 806{
807 unsigned rdyToPauseTicks, wrDataSetupTicks, addrTicks; 807 unsigned rdyToPauseTicks, wrDataSetupTicks, addrTicks;
@@ -829,7 +829,7 @@ set_timings_udma_ata4(u32 *timings, u8 speed)
829/* 829/*
830 * Calculate Kauai ATA/100 UDMA timings 830 * Calculate Kauai ATA/100 UDMA timings
831 */ 831 */
832static int __pmac 832static int
833set_timings_udma_ata6(u32 *pio_timings, u32 *ultra_timings, u8 speed) 833set_timings_udma_ata6(u32 *pio_timings, u32 *ultra_timings, u8 speed)
834{ 834{
835 struct ide_timing *t = ide_timing_find_mode(speed); 835 struct ide_timing *t = ide_timing_find_mode(speed);
@@ -849,7 +849,7 @@ set_timings_udma_ata6(u32 *pio_timings, u32 *ultra_timings, u8 speed)
849/* 849/*
850 * Calculate Shasta ATA/133 UDMA timings 850 * Calculate Shasta ATA/133 UDMA timings
851 */ 851 */
852static int __pmac 852static int
853set_timings_udma_shasta(u32 *pio_timings, u32 *ultra_timings, u8 speed) 853set_timings_udma_shasta(u32 *pio_timings, u32 *ultra_timings, u8 speed)
854{ 854{
855 struct ide_timing *t = ide_timing_find_mode(speed); 855 struct ide_timing *t = ide_timing_find_mode(speed);
@@ -869,7 +869,7 @@ set_timings_udma_shasta(u32 *pio_timings, u32 *ultra_timings, u8 speed)
869/* 869/*
870 * Calculate MDMA timings for all cells 870 * Calculate MDMA timings for all cells
871 */ 871 */
872static int __pmac 872static int
873set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2, 873set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2,
874 u8 speed, int drive_cycle_time) 874 u8 speed, int drive_cycle_time)
875{ 875{
@@ -1014,7 +1014,7 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2,
1014 * our dedicated function is more precise as it uses the drive provided 1014 * our dedicated function is more precise as it uses the drive provided
1015 * cycle time value. We should probably fix this one to deal with that too... 1015 * cycle time value. We should probably fix this one to deal with that too...
1016 */ 1016 */
1017static int __pmac 1017static int
1018pmac_ide_tune_chipset (ide_drive_t *drive, byte speed) 1018pmac_ide_tune_chipset (ide_drive_t *drive, byte speed)
1019{ 1019{
1020 int unit = (drive->select.b.unit & 0x01); 1020 int unit = (drive->select.b.unit & 0x01);
@@ -1092,7 +1092,7 @@ pmac_ide_tune_chipset (ide_drive_t *drive, byte speed)
1092 * Blast some well known "safe" values to the timing registers at init or 1092 * Blast some well known "safe" values to the timing registers at init or
1093 * wakeup from sleep time, before we do real calculation 1093 * wakeup from sleep time, before we do real calculation
1094 */ 1094 */
1095static void __pmac 1095static void
1096sanitize_timings(pmac_ide_hwif_t *pmif) 1096sanitize_timings(pmac_ide_hwif_t *pmif)
1097{ 1097{
1098 unsigned int value, value2 = 0; 1098 unsigned int value, value2 = 0;
@@ -1123,13 +1123,13 @@ sanitize_timings(pmac_ide_hwif_t *pmif)
1123 pmif->timings[2] = pmif->timings[3] = value2; 1123 pmif->timings[2] = pmif->timings[3] = value2;
1124} 1124}
1125 1125
1126unsigned long __pmac 1126unsigned long
1127pmac_ide_get_base(int index) 1127pmac_ide_get_base(int index)
1128{ 1128{
1129 return pmac_ide[index].regbase; 1129 return pmac_ide[index].regbase;
1130} 1130}
1131 1131
1132int __pmac 1132int
1133pmac_ide_check_base(unsigned long base) 1133pmac_ide_check_base(unsigned long base)
1134{ 1134{
1135 int ix; 1135 int ix;
@@ -1140,7 +1140,7 @@ pmac_ide_check_base(unsigned long base)
1140 return -1; 1140 return -1;
1141} 1141}
1142 1142
1143int __pmac 1143int
1144pmac_ide_get_irq(unsigned long base) 1144pmac_ide_get_irq(unsigned long base)
1145{ 1145{
1146 int ix; 1146 int ix;
@@ -1151,7 +1151,7 @@ pmac_ide_get_irq(unsigned long base)
1151 return 0; 1151 return 0;
1152} 1152}
1153 1153
1154static int ide_majors[] __pmacdata = { 3, 22, 33, 34, 56, 57 }; 1154static int ide_majors[] = { 3, 22, 33, 34, 56, 57 };
1155 1155
1156dev_t __init 1156dev_t __init
1157pmac_find_ide_boot(char *bootdevice, int n) 1157pmac_find_ide_boot(char *bootdevice, int n)
@@ -1701,7 +1701,7 @@ pmac_ide_probe(void)
1701 * pmac_ide_build_dmatable builds the DBDMA command list 1701 * pmac_ide_build_dmatable builds the DBDMA command list
1702 * for a transfer and sets the DBDMA channel to point to it. 1702 * for a transfer and sets the DBDMA channel to point to it.
1703 */ 1703 */
1704static int __pmac 1704static int
1705pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq) 1705pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq)
1706{ 1706{
1707 struct dbdma_cmd *table; 1707 struct dbdma_cmd *table;
@@ -1785,7 +1785,7 @@ pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq)
1785} 1785}
1786 1786
1787/* Teardown mappings after DMA has completed. */ 1787/* Teardown mappings after DMA has completed. */
1788static void __pmac 1788static void
1789pmac_ide_destroy_dmatable (ide_drive_t *drive) 1789pmac_ide_destroy_dmatable (ide_drive_t *drive)
1790{ 1790{
1791 ide_hwif_t *hwif = drive->hwif; 1791 ide_hwif_t *hwif = drive->hwif;
@@ -1802,7 +1802,7 @@ pmac_ide_destroy_dmatable (ide_drive_t *drive)
1802/* 1802/*
1803 * Pick up best MDMA timing for the drive and apply it 1803 * Pick up best MDMA timing for the drive and apply it
1804 */ 1804 */
1805static int __pmac 1805static int
1806pmac_ide_mdma_enable(ide_drive_t *drive, u16 mode) 1806pmac_ide_mdma_enable(ide_drive_t *drive, u16 mode)
1807{ 1807{
1808 ide_hwif_t *hwif = HWIF(drive); 1808 ide_hwif_t *hwif = HWIF(drive);
@@ -1859,7 +1859,7 @@ pmac_ide_mdma_enable(ide_drive_t *drive, u16 mode)
1859/* 1859/*
1860 * Pick up best UDMA timing for the drive and apply it 1860 * Pick up best UDMA timing for the drive and apply it
1861 */ 1861 */
1862static int __pmac 1862static int
1863pmac_ide_udma_enable(ide_drive_t *drive, u16 mode) 1863pmac_ide_udma_enable(ide_drive_t *drive, u16 mode)
1864{ 1864{
1865 ide_hwif_t *hwif = HWIF(drive); 1865 ide_hwif_t *hwif = HWIF(drive);
@@ -1915,7 +1915,7 @@ pmac_ide_udma_enable(ide_drive_t *drive, u16 mode)
1915 * Check what is the best DMA timing setting for the drive and 1915 * Check what is the best DMA timing setting for the drive and
1916 * call appropriate functions to apply it. 1916 * call appropriate functions to apply it.
1917 */ 1917 */
1918static int __pmac 1918static int
1919pmac_ide_dma_check(ide_drive_t *drive) 1919pmac_ide_dma_check(ide_drive_t *drive)
1920{ 1920{
1921 struct hd_driveid *id = drive->id; 1921 struct hd_driveid *id = drive->id;
@@ -1967,7 +1967,7 @@ pmac_ide_dma_check(ide_drive_t *drive)
1967 * Prepare a DMA transfer. We build the DMA table, adjust the timings for 1967 * Prepare a DMA transfer. We build the DMA table, adjust the timings for
1968 * a read on KeyLargo ATA/66 and mark us as waiting for DMA completion 1968 * a read on KeyLargo ATA/66 and mark us as waiting for DMA completion
1969 */ 1969 */
1970static int __pmac 1970static int
1971pmac_ide_dma_setup(ide_drive_t *drive) 1971pmac_ide_dma_setup(ide_drive_t *drive)
1972{ 1972{
1973 ide_hwif_t *hwif = HWIF(drive); 1973 ide_hwif_t *hwif = HWIF(drive);
@@ -1997,7 +1997,7 @@ pmac_ide_dma_setup(ide_drive_t *drive)
1997 return 0; 1997 return 0;
1998} 1998}
1999 1999
2000static void __pmac 2000static void
2001pmac_ide_dma_exec_cmd(ide_drive_t *drive, u8 command) 2001pmac_ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
2002{ 2002{
2003 /* issue cmd to drive */ 2003 /* issue cmd to drive */
@@ -2008,7 +2008,7 @@ pmac_ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
2008 * Kick the DMA controller into life after the DMA command has been issued 2008 * Kick the DMA controller into life after the DMA command has been issued
2009 * to the drive. 2009 * to the drive.
2010 */ 2010 */
2011static void __pmac 2011static void
2012pmac_ide_dma_start(ide_drive_t *drive) 2012pmac_ide_dma_start(ide_drive_t *drive)
2013{ 2013{
2014 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data; 2014 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data;
@@ -2024,7 +2024,7 @@ pmac_ide_dma_start(ide_drive_t *drive)
2024/* 2024/*
2025 * After a DMA transfer, make sure the controller is stopped 2025 * After a DMA transfer, make sure the controller is stopped
2026 */ 2026 */
2027static int __pmac 2027static int
2028pmac_ide_dma_end (ide_drive_t *drive) 2028pmac_ide_dma_end (ide_drive_t *drive)
2029{ 2029{
2030 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data; 2030 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data;
@@ -2052,7 +2052,7 @@ pmac_ide_dma_end (ide_drive_t *drive)
2052 * that's not implemented yet), on the other hand, we don't have shared interrupts 2052 * that's not implemented yet), on the other hand, we don't have shared interrupts
2053 * so it's not really a problem 2053 * so it's not really a problem
2054 */ 2054 */
2055static int __pmac 2055static int
2056pmac_ide_dma_test_irq (ide_drive_t *drive) 2056pmac_ide_dma_test_irq (ide_drive_t *drive)
2057{ 2057{
2058 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data; 2058 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data;
@@ -2108,19 +2108,19 @@ pmac_ide_dma_test_irq (ide_drive_t *drive)
2108 return 1; 2108 return 1;
2109} 2109}
2110 2110
2111static int __pmac 2111static int
2112pmac_ide_dma_host_off (ide_drive_t *drive) 2112pmac_ide_dma_host_off (ide_drive_t *drive)
2113{ 2113{
2114 return 0; 2114 return 0;
2115} 2115}
2116 2116
2117static int __pmac 2117static int
2118pmac_ide_dma_host_on (ide_drive_t *drive) 2118pmac_ide_dma_host_on (ide_drive_t *drive)
2119{ 2119{
2120 return 0; 2120 return 0;
2121} 2121}
2122 2122
2123static int __pmac 2123static int
2124pmac_ide_dma_lostirq (ide_drive_t *drive) 2124pmac_ide_dma_lostirq (ide_drive_t *drive)
2125{ 2125{
2126 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data; 2126 pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data;
diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c
index 5e0811dc6536..2b8a6e821d44 100644
--- a/drivers/macintosh/ans-lcd.c
+++ b/drivers/macintosh/ans-lcd.c
@@ -27,7 +27,7 @@ static volatile unsigned char __iomem *anslcd_ptr;
27 27
28#undef DEBUG 28#undef DEBUG
29 29
30static void __pmac 30static void
31anslcd_write_byte_ctrl ( unsigned char c ) 31anslcd_write_byte_ctrl ( unsigned char c )
32{ 32{
33#ifdef DEBUG 33#ifdef DEBUG
@@ -43,14 +43,14 @@ anslcd_write_byte_ctrl ( unsigned char c )
43 } 43 }
44} 44}
45 45
46static void __pmac 46static void
47anslcd_write_byte_data ( unsigned char c ) 47anslcd_write_byte_data ( unsigned char c )
48{ 48{
49 out_8(anslcd_ptr + ANSLCD_DATA_IX, c); 49 out_8(anslcd_ptr + ANSLCD_DATA_IX, c);
50 udelay(anslcd_short_delay); 50 udelay(anslcd_short_delay);
51} 51}
52 52
53static ssize_t __pmac 53static ssize_t
54anslcd_write( struct file * file, const char __user * buf, 54anslcd_write( struct file * file, const char __user * buf,
55 size_t count, loff_t *ppos ) 55 size_t count, loff_t *ppos )
56{ 56{
@@ -73,7 +73,7 @@ anslcd_write( struct file * file, const char __user * buf,
73 return p - buf; 73 return p - buf;
74} 74}
75 75
76static int __pmac 76static int
77anslcd_ioctl( struct inode * inode, struct file * file, 77anslcd_ioctl( struct inode * inode, struct file * file,
78 unsigned int cmd, unsigned long arg ) 78 unsigned int cmd, unsigned long arg )
79{ 79{
@@ -115,7 +115,7 @@ anslcd_ioctl( struct inode * inode, struct file * file,
115 } 115 }
116} 116}
117 117
118static int __pmac 118static int
119anslcd_open( struct inode * inode, struct file * file ) 119anslcd_open( struct inode * inode, struct file * file )
120{ 120{
121 return 0; 121 return 0;
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index c0712a1ea5af..b856bb67169c 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -167,19 +167,19 @@ enum {
167 * Functions for polling content of media bay 167 * Functions for polling content of media bay
168 */ 168 */
169 169
170static u8 __pmac 170static u8
171ohare_mb_content(struct media_bay_info *bay) 171ohare_mb_content(struct media_bay_info *bay)
172{ 172{
173 return (MB_IN32(bay, OHARE_MBCR) >> 12) & 7; 173 return (MB_IN32(bay, OHARE_MBCR) >> 12) & 7;
174} 174}
175 175
176static u8 __pmac 176static u8
177heathrow_mb_content(struct media_bay_info *bay) 177heathrow_mb_content(struct media_bay_info *bay)
178{ 178{
179 return (MB_IN32(bay, HEATHROW_MBCR) >> 12) & 7; 179 return (MB_IN32(bay, HEATHROW_MBCR) >> 12) & 7;
180} 180}
181 181
182static u8 __pmac 182static u8
183keylargo_mb_content(struct media_bay_info *bay) 183keylargo_mb_content(struct media_bay_info *bay)
184{ 184{
185 int new_gpio; 185 int new_gpio;
@@ -205,7 +205,7 @@ keylargo_mb_content(struct media_bay_info *bay)
205 * into reset state as well 205 * into reset state as well
206 */ 206 */
207 207
208static void __pmac 208static void
209ohare_mb_power(struct media_bay_info* bay, int on_off) 209ohare_mb_power(struct media_bay_info* bay, int on_off)
210{ 210{
211 if (on_off) { 211 if (on_off) {
@@ -224,7 +224,7 @@ ohare_mb_power(struct media_bay_info* bay, int on_off)
224 MB_BIC(bay, OHARE_MBCR, 0x00000F00); 224 MB_BIC(bay, OHARE_MBCR, 0x00000F00);
225} 225}
226 226
227static void __pmac 227static void
228heathrow_mb_power(struct media_bay_info* bay, int on_off) 228heathrow_mb_power(struct media_bay_info* bay, int on_off)
229{ 229{
230 if (on_off) { 230 if (on_off) {
@@ -243,7 +243,7 @@ heathrow_mb_power(struct media_bay_info* bay, int on_off)
243 MB_BIC(bay, HEATHROW_MBCR, 0x00000F00); 243 MB_BIC(bay, HEATHROW_MBCR, 0x00000F00);
244} 244}
245 245
246static void __pmac 246static void
247keylargo_mb_power(struct media_bay_info* bay, int on_off) 247keylargo_mb_power(struct media_bay_info* bay, int on_off)
248{ 248{
249 if (on_off) { 249 if (on_off) {
@@ -267,7 +267,7 @@ keylargo_mb_power(struct media_bay_info* bay, int on_off)
267 * enable the related busses 267 * enable the related busses
268 */ 268 */
269 269
270static int __pmac 270static int
271ohare_mb_setup_bus(struct media_bay_info* bay, u8 device_id) 271ohare_mb_setup_bus(struct media_bay_info* bay, u8 device_id)
272{ 272{
273 switch(device_id) { 273 switch(device_id) {
@@ -287,7 +287,7 @@ ohare_mb_setup_bus(struct media_bay_info* bay, u8 device_id)
287 return -ENODEV; 287 return -ENODEV;
288} 288}
289 289
290static int __pmac 290static int
291heathrow_mb_setup_bus(struct media_bay_info* bay, u8 device_id) 291heathrow_mb_setup_bus(struct media_bay_info* bay, u8 device_id)
292{ 292{
293 switch(device_id) { 293 switch(device_id) {
@@ -307,7 +307,7 @@ heathrow_mb_setup_bus(struct media_bay_info* bay, u8 device_id)
307 return -ENODEV; 307 return -ENODEV;
308} 308}
309 309
310static int __pmac 310static int
311keylargo_mb_setup_bus(struct media_bay_info* bay, u8 device_id) 311keylargo_mb_setup_bus(struct media_bay_info* bay, u8 device_id)
312{ 312{
313 switch(device_id) { 313 switch(device_id) {
@@ -330,43 +330,43 @@ keylargo_mb_setup_bus(struct media_bay_info* bay, u8 device_id)
330 * Functions for tweaking resets 330 * Functions for tweaking resets
331 */ 331 */
332 332
333static void __pmac 333static void
334ohare_mb_un_reset(struct media_bay_info* bay) 334ohare_mb_un_reset(struct media_bay_info* bay)
335{ 335{
336 MB_BIS(bay, OHARE_FCR, OH_BAY_RESET_N); 336 MB_BIS(bay, OHARE_FCR, OH_BAY_RESET_N);
337} 337}
338 338
339static void __pmac keylargo_mb_init(struct media_bay_info *bay) 339static void keylargo_mb_init(struct media_bay_info *bay)
340{ 340{
341 MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_ENABLE); 341 MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_ENABLE);
342} 342}
343 343
344static void __pmac heathrow_mb_un_reset(struct media_bay_info* bay) 344static void heathrow_mb_un_reset(struct media_bay_info* bay)
345{ 345{
346 MB_BIS(bay, HEATHROW_FCR, HRW_BAY_RESET_N); 346 MB_BIS(bay, HEATHROW_FCR, HRW_BAY_RESET_N);
347} 347}
348 348
349static void __pmac keylargo_mb_un_reset(struct media_bay_info* bay) 349static void keylargo_mb_un_reset(struct media_bay_info* bay)
350{ 350{
351 MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_DEV_RESET); 351 MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_DEV_RESET);
352} 352}
353 353
354static void __pmac ohare_mb_un_reset_ide(struct media_bay_info* bay) 354static void ohare_mb_un_reset_ide(struct media_bay_info* bay)
355{ 355{
356 MB_BIS(bay, OHARE_FCR, OH_IDE1_RESET_N); 356 MB_BIS(bay, OHARE_FCR, OH_IDE1_RESET_N);
357} 357}
358 358
359static void __pmac heathrow_mb_un_reset_ide(struct media_bay_info* bay) 359static void heathrow_mb_un_reset_ide(struct media_bay_info* bay)
360{ 360{
361 MB_BIS(bay, HEATHROW_FCR, HRW_IDE1_RESET_N); 361 MB_BIS(bay, HEATHROW_FCR, HRW_IDE1_RESET_N);
362} 362}
363 363
364static void __pmac keylargo_mb_un_reset_ide(struct media_bay_info* bay) 364static void keylargo_mb_un_reset_ide(struct media_bay_info* bay)
365{ 365{
366 MB_BIS(bay, KEYLARGO_FCR1, KL1_EIDE0_RESET_N); 366 MB_BIS(bay, KEYLARGO_FCR1, KL1_EIDE0_RESET_N);
367} 367}
368 368
369static inline void __pmac set_mb_power(struct media_bay_info* bay, int onoff) 369static inline void set_mb_power(struct media_bay_info* bay, int onoff)
370{ 370{
371 /* Power up up and assert the bay reset line */ 371 /* Power up up and assert the bay reset line */
372 if (onoff) { 372 if (onoff) {
@@ -382,7 +382,7 @@ static inline void __pmac set_mb_power(struct media_bay_info* bay, int onoff)
382 bay->timer = msecs_to_jiffies(MB_POWER_DELAY); 382 bay->timer = msecs_to_jiffies(MB_POWER_DELAY);
383} 383}
384 384
385static void __pmac poll_media_bay(struct media_bay_info* bay) 385static void poll_media_bay(struct media_bay_info* bay)
386{ 386{
387 int id = bay->ops->content(bay); 387 int id = bay->ops->content(bay);
388 388
@@ -415,7 +415,7 @@ static void __pmac poll_media_bay(struct media_bay_info* bay)
415 } 415 }
416} 416}
417 417
418int __pmac check_media_bay(struct device_node *which_bay, int what) 418int check_media_bay(struct device_node *which_bay, int what)
419{ 419{
420#ifdef CONFIG_BLK_DEV_IDE 420#ifdef CONFIG_BLK_DEV_IDE
421 int i; 421 int i;
@@ -432,7 +432,7 @@ int __pmac check_media_bay(struct device_node *which_bay, int what)
432} 432}
433EXPORT_SYMBOL(check_media_bay); 433EXPORT_SYMBOL(check_media_bay);
434 434
435int __pmac check_media_bay_by_base(unsigned long base, int what) 435int check_media_bay_by_base(unsigned long base, int what)
436{ 436{
437#ifdef CONFIG_BLK_DEV_IDE 437#ifdef CONFIG_BLK_DEV_IDE
438 int i; 438 int i;
@@ -449,7 +449,7 @@ int __pmac check_media_bay_by_base(unsigned long base, int what)
449 return -ENODEV; 449 return -ENODEV;
450} 450}
451 451
452int __pmac media_bay_set_ide_infos(struct device_node* which_bay, unsigned long base, 452int media_bay_set_ide_infos(struct device_node* which_bay, unsigned long base,
453 int irq, int index) 453 int irq, int index)
454{ 454{
455#ifdef CONFIG_BLK_DEV_IDE 455#ifdef CONFIG_BLK_DEV_IDE
@@ -489,7 +489,7 @@ int __pmac media_bay_set_ide_infos(struct device_node* which_bay, unsigned long
489 return -ENODEV; 489 return -ENODEV;
490} 490}
491 491
492static void __pmac media_bay_step(int i) 492static void media_bay_step(int i)
493{ 493{
494 struct media_bay_info* bay = &media_bays[i]; 494 struct media_bay_info* bay = &media_bays[i];
495 495
@@ -619,7 +619,7 @@ static void __pmac media_bay_step(int i)
619 * with the IDE driver. It needs to be a thread because 619 * with the IDE driver. It needs to be a thread because
620 * ide_register can't be called from interrupt context. 620 * ide_register can't be called from interrupt context.
621 */ 621 */
622static int __pmac media_bay_task(void *x) 622static int media_bay_task(void *x)
623{ 623{
624 int i; 624 int i;
625 625
@@ -704,7 +704,7 @@ static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_de
704 704
705} 705}
706 706
707static int __pmac media_bay_suspend(struct macio_dev *mdev, pm_message_t state) 707static int media_bay_suspend(struct macio_dev *mdev, pm_message_t state)
708{ 708{
709 struct media_bay_info *bay = macio_get_drvdata(mdev); 709 struct media_bay_info *bay = macio_get_drvdata(mdev);
710 710
@@ -719,7 +719,7 @@ static int __pmac media_bay_suspend(struct macio_dev *mdev, pm_message_t state)
719 return 0; 719 return 0;
720} 720}
721 721
722static int __pmac media_bay_resume(struct macio_dev *mdev) 722static int media_bay_resume(struct macio_dev *mdev)
723{ 723{
724 struct media_bay_info *bay = macio_get_drvdata(mdev); 724 struct media_bay_info *bay = macio_get_drvdata(mdev);
725 725
@@ -760,7 +760,7 @@ static int __pmac media_bay_resume(struct macio_dev *mdev)
760 760
761/* Definitions of "ops" structures. 761/* Definitions of "ops" structures.
762 */ 762 */
763static struct mb_ops ohare_mb_ops __pmacdata = { 763static struct mb_ops ohare_mb_ops = {
764 .name = "Ohare", 764 .name = "Ohare",
765 .content = ohare_mb_content, 765 .content = ohare_mb_content,
766 .power = ohare_mb_power, 766 .power = ohare_mb_power,
@@ -769,7 +769,7 @@ static struct mb_ops ohare_mb_ops __pmacdata = {
769 .un_reset_ide = ohare_mb_un_reset_ide, 769 .un_reset_ide = ohare_mb_un_reset_ide,
770}; 770};
771 771
772static struct mb_ops heathrow_mb_ops __pmacdata = { 772static struct mb_ops heathrow_mb_ops = {
773 .name = "Heathrow", 773 .name = "Heathrow",
774 .content = heathrow_mb_content, 774 .content = heathrow_mb_content,
775 .power = heathrow_mb_power, 775 .power = heathrow_mb_power,
@@ -778,7 +778,7 @@ static struct mb_ops heathrow_mb_ops __pmacdata = {
778 .un_reset_ide = heathrow_mb_un_reset_ide, 778 .un_reset_ide = heathrow_mb_un_reset_ide,
779}; 779};
780 780
781static struct mb_ops keylargo_mb_ops __pmacdata = { 781static struct mb_ops keylargo_mb_ops = {
782 .name = "KeyLargo", 782 .name = "KeyLargo",
783 .init = keylargo_mb_init, 783 .init = keylargo_mb_init,
784 .content = keylargo_mb_content, 784 .content = keylargo_mb_content,
diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c
index 417deb5de108..d843a6c9c6df 100644
--- a/drivers/macintosh/via-cuda.c
+++ b/drivers/macintosh/via-cuda.c
@@ -37,7 +37,6 @@ static DEFINE_SPINLOCK(cuda_lock);
37 37
38#ifdef CONFIG_MAC 38#ifdef CONFIG_MAC
39#define CUDA_IRQ IRQ_MAC_ADB 39#define CUDA_IRQ IRQ_MAC_ADB
40#define __openfirmware
41#define eieio() 40#define eieio()
42#else 41#else
43#define CUDA_IRQ vias->intrs[0].line 42#define CUDA_IRQ vias->intrs[0].line
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 645a2e5c70ab..76719451e384 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -244,7 +244,7 @@ int pmu_wink(struct adb_request *req);
244 * - the number of response bytes which the PMU will return, or 244 * - the number of response bytes which the PMU will return, or
245 * -1 if it will send a length byte. 245 * -1 if it will send a length byte.
246 */ 246 */
247static const s8 pmu_data_len[256][2] __openfirmwaredata = { 247static const s8 pmu_data_len[256][2] = {
248/* 0 1 2 3 4 5 6 7 */ 248/* 0 1 2 3 4 5 6 7 */
249/*00*/ {-1, 0},{-1, 0},{-1, 0},{-1, 0},{-1, 0},{-1, 0},{-1, 0},{-1, 0}, 249/*00*/ {-1, 0},{-1, 0},{-1, 0},{-1, 0},{-1, 0},{-1, 0},{-1, 0},{-1, 0},
250/*08*/ {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 250/*08*/ {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
@@ -295,7 +295,7 @@ static struct backlight_controller pmu_backlight_controller = {
295}; 295};
296#endif /* CONFIG_PMAC_BACKLIGHT */ 296#endif /* CONFIG_PMAC_BACKLIGHT */
297 297
298int __openfirmware 298int
299find_via_pmu(void) 299find_via_pmu(void)
300{ 300{
301 if (via != 0) 301 if (via != 0)
@@ -374,7 +374,7 @@ find_via_pmu(void)
374} 374}
375 375
376#ifdef CONFIG_ADB 376#ifdef CONFIG_ADB
377static int __openfirmware 377static int
378pmu_probe(void) 378pmu_probe(void)
379{ 379{
380 return vias == NULL? -ENODEV: 0; 380 return vias == NULL? -ENODEV: 0;
@@ -520,7 +520,7 @@ static int __init via_pmu_dev_init(void)
520 520
521device_initcall(via_pmu_dev_init); 521device_initcall(via_pmu_dev_init);
522 522
523static int __openfirmware 523static int
524init_pmu(void) 524init_pmu(void)
525{ 525{
526 int timeout; 526 int timeout;
@@ -625,7 +625,7 @@ static void pmu_set_server_mode(int server_mode)
625/* This new version of the code for 2400/3400/3500 powerbooks 625/* This new version of the code for 2400/3400/3500 powerbooks
626 * is inspired from the implementation in gkrellm-pmu 626 * is inspired from the implementation in gkrellm-pmu
627 */ 627 */
628static void __pmac 628static void
629done_battery_state_ohare(struct adb_request* req) 629done_battery_state_ohare(struct adb_request* req)
630{ 630{
631 /* format: 631 /* format:
@@ -713,7 +713,7 @@ done_battery_state_ohare(struct adb_request* req)
713 clear_bit(0, &async_req_locks); 713 clear_bit(0, &async_req_locks);
714} 714}
715 715
716static void __pmac 716static void
717done_battery_state_smart(struct adb_request* req) 717done_battery_state_smart(struct adb_request* req)
718{ 718{
719 /* format: 719 /* format:
@@ -791,7 +791,7 @@ done_battery_state_smart(struct adb_request* req)
791 clear_bit(0, &async_req_locks); 791 clear_bit(0, &async_req_locks);
792} 792}
793 793
794static void __pmac 794static void
795query_battery_state(void) 795query_battery_state(void)
796{ 796{
797 if (test_and_set_bit(0, &async_req_locks)) 797 if (test_and_set_bit(0, &async_req_locks))
@@ -804,7 +804,7 @@ query_battery_state(void)
804 2, PMU_SMART_BATTERY_STATE, pmu_cur_battery+1); 804 2, PMU_SMART_BATTERY_STATE, pmu_cur_battery+1);
805} 805}
806 806
807static int __pmac 807static int
808proc_get_info(char *page, char **start, off_t off, 808proc_get_info(char *page, char **start, off_t off,
809 int count, int *eof, void *data) 809 int count, int *eof, void *data)
810{ 810{
@@ -819,7 +819,7 @@ proc_get_info(char *page, char **start, off_t off,
819 return p - page; 819 return p - page;
820} 820}
821 821
822static int __pmac 822static int
823proc_get_irqstats(char *page, char **start, off_t off, 823proc_get_irqstats(char *page, char **start, off_t off,
824 int count, int *eof, void *data) 824 int count, int *eof, void *data)
825{ 825{
@@ -846,7 +846,7 @@ proc_get_irqstats(char *page, char **start, off_t off,
846 return p - page; 846 return p - page;
847} 847}
848 848
849static int __pmac 849static int
850proc_get_batt(char *page, char **start, off_t off, 850proc_get_batt(char *page, char **start, off_t off,
851 int count, int *eof, void *data) 851 int count, int *eof, void *data)
852{ 852{
@@ -870,7 +870,7 @@ proc_get_batt(char *page, char **start, off_t off,
870 return p - page; 870 return p - page;
871} 871}
872 872
873static int __pmac 873static int
874proc_read_options(char *page, char **start, off_t off, 874proc_read_options(char *page, char **start, off_t off,
875 int count, int *eof, void *data) 875 int count, int *eof, void *data)
876{ 876{
@@ -887,7 +887,7 @@ proc_read_options(char *page, char **start, off_t off,
887 return p - page; 887 return p - page;
888} 888}
889 889
890static int __pmac 890static int
891proc_write_options(struct file *file, const char __user *buffer, 891proc_write_options(struct file *file, const char __user *buffer,
892 unsigned long count, void *data) 892 unsigned long count, void *data)
893{ 893{
@@ -934,7 +934,7 @@ proc_write_options(struct file *file, const char __user *buffer,
934 934
935#ifdef CONFIG_ADB 935#ifdef CONFIG_ADB
936/* Send an ADB command */ 936/* Send an ADB command */
937static int __pmac 937static int
938pmu_send_request(struct adb_request *req, int sync) 938pmu_send_request(struct adb_request *req, int sync)
939{ 939{
940 int i, ret; 940 int i, ret;
@@ -1014,7 +1014,7 @@ pmu_send_request(struct adb_request *req, int sync)
1014} 1014}
1015 1015
1016/* Enable/disable autopolling */ 1016/* Enable/disable autopolling */
1017static int __pmac 1017static int
1018pmu_adb_autopoll(int devs) 1018pmu_adb_autopoll(int devs)
1019{ 1019{
1020 struct adb_request req; 1020 struct adb_request req;
@@ -1037,7 +1037,7 @@ pmu_adb_autopoll(int devs)
1037} 1037}
1038 1038
1039/* Reset the ADB bus */ 1039/* Reset the ADB bus */
1040static int __pmac 1040static int
1041pmu_adb_reset_bus(void) 1041pmu_adb_reset_bus(void)
1042{ 1042{
1043 struct adb_request req; 1043 struct adb_request req;
@@ -1072,7 +1072,7 @@ pmu_adb_reset_bus(void)
1072#endif /* CONFIG_ADB */ 1072#endif /* CONFIG_ADB */
1073 1073
1074/* Construct and send a pmu request */ 1074/* Construct and send a pmu request */
1075int __openfirmware 1075int
1076pmu_request(struct adb_request *req, void (*done)(struct adb_request *), 1076pmu_request(struct adb_request *req, void (*done)(struct adb_request *),
1077 int nbytes, ...) 1077 int nbytes, ...)
1078{ 1078{
@@ -1098,7 +1098,7 @@ pmu_request(struct adb_request *req, void (*done)(struct adb_request *),
1098 return pmu_queue_request(req); 1098 return pmu_queue_request(req);
1099} 1099}
1100 1100
1101int __pmac 1101int
1102pmu_queue_request(struct adb_request *req) 1102pmu_queue_request(struct adb_request *req)
1103{ 1103{
1104 unsigned long flags; 1104 unsigned long flags;
@@ -1190,7 +1190,7 @@ pmu_done(struct adb_request *req)
1190 (*done)(req); 1190 (*done)(req);
1191} 1191}
1192 1192
1193static void __pmac 1193static void
1194pmu_start(void) 1194pmu_start(void)
1195{ 1195{
1196 struct adb_request *req; 1196 struct adb_request *req;
@@ -1214,7 +1214,7 @@ pmu_start(void)
1214 send_byte(req->data[0]); 1214 send_byte(req->data[0]);
1215} 1215}
1216 1216
1217void __openfirmware 1217void
1218pmu_poll(void) 1218pmu_poll(void)
1219{ 1219{
1220 if (!via) 1220 if (!via)
@@ -1224,7 +1224,7 @@ pmu_poll(void)
1224 via_pmu_interrupt(0, NULL, NULL); 1224 via_pmu_interrupt(0, NULL, NULL);
1225} 1225}
1226 1226
1227void __openfirmware 1227void
1228pmu_poll_adb(void) 1228pmu_poll_adb(void)
1229{ 1229{
1230 if (!via) 1230 if (!via)
@@ -1239,7 +1239,7 @@ pmu_poll_adb(void)
1239 || req_awaiting_reply)); 1239 || req_awaiting_reply));
1240} 1240}
1241 1241
1242void __openfirmware 1242void
1243pmu_wait_complete(struct adb_request *req) 1243pmu_wait_complete(struct adb_request *req)
1244{ 1244{
1245 if (!via) 1245 if (!via)
@@ -1253,7 +1253,7 @@ pmu_wait_complete(struct adb_request *req)
1253 * This is done to avoid spurrious shutdowns when we know we'll have 1253 * This is done to avoid spurrious shutdowns when we know we'll have
1254 * interrupts switched off for a long time 1254 * interrupts switched off for a long time
1255 */ 1255 */
1256void __openfirmware 1256void
1257pmu_suspend(void) 1257pmu_suspend(void)
1258{ 1258{
1259 unsigned long flags; 1259 unsigned long flags;
@@ -1293,7 +1293,7 @@ pmu_suspend(void)
1293 } while (1); 1293 } while (1);
1294} 1294}
1295 1295
1296void __openfirmware 1296void
1297pmu_resume(void) 1297pmu_resume(void)
1298{ 1298{
1299 unsigned long flags; 1299 unsigned long flags;
@@ -1323,7 +1323,7 @@ pmu_resume(void)
1323} 1323}
1324 1324
1325/* Interrupt data could be the result data from an ADB cmd */ 1325/* Interrupt data could be the result data from an ADB cmd */
1326static void __pmac 1326static void
1327pmu_handle_data(unsigned char *data, int len, struct pt_regs *regs) 1327pmu_handle_data(unsigned char *data, int len, struct pt_regs *regs)
1328{ 1328{
1329 unsigned char ints, pirq; 1329 unsigned char ints, pirq;
@@ -1435,7 +1435,7 @@ next:
1435 goto next; 1435 goto next;
1436} 1436}
1437 1437
1438static struct adb_request* __pmac 1438static struct adb_request*
1439pmu_sr_intr(struct pt_regs *regs) 1439pmu_sr_intr(struct pt_regs *regs)
1440{ 1440{
1441 struct adb_request *req; 1441 struct adb_request *req;
@@ -1541,7 +1541,7 @@ pmu_sr_intr(struct pt_regs *regs)
1541 return NULL; 1541 return NULL;
1542} 1542}
1543 1543
1544static irqreturn_t __pmac 1544static irqreturn_t
1545via_pmu_interrupt(int irq, void *arg, struct pt_regs *regs) 1545via_pmu_interrupt(int irq, void *arg, struct pt_regs *regs)
1546{ 1546{
1547 unsigned long flags; 1547 unsigned long flags;
@@ -1629,7 +1629,7 @@ no_free_slot:
1629 return IRQ_RETVAL(handled); 1629 return IRQ_RETVAL(handled);
1630} 1630}
1631 1631
1632void __pmac 1632void
1633pmu_unlock(void) 1633pmu_unlock(void)
1634{ 1634{
1635 unsigned long flags; 1635 unsigned long flags;
@@ -1642,7 +1642,7 @@ pmu_unlock(void)
1642} 1642}
1643 1643
1644 1644
1645static irqreturn_t __pmac 1645static irqreturn_t
1646gpio1_interrupt(int irq, void *arg, struct pt_regs *regs) 1646gpio1_interrupt(int irq, void *arg, struct pt_regs *regs)
1647{ 1647{
1648 unsigned long flags; 1648 unsigned long flags;
@@ -1663,12 +1663,12 @@ gpio1_interrupt(int irq, void *arg, struct pt_regs *regs)
1663} 1663}
1664 1664
1665#ifdef CONFIG_PMAC_BACKLIGHT 1665#ifdef CONFIG_PMAC_BACKLIGHT
1666static int backlight_to_bright[] __pmacdata = { 1666static int backlight_to_bright[] = {
1667 0x7f, 0x46, 0x42, 0x3e, 0x3a, 0x36, 0x32, 0x2e, 1667 0x7f, 0x46, 0x42, 0x3e, 0x3a, 0x36, 0x32, 0x2e,
1668 0x2a, 0x26, 0x22, 0x1e, 0x1a, 0x16, 0x12, 0x0e 1668 0x2a, 0x26, 0x22, 0x1e, 0x1a, 0x16, 0x12, 0x0e
1669}; 1669};
1670 1670
1671static int __openfirmware 1671static int
1672pmu_set_backlight_enable(int on, int level, void* data) 1672pmu_set_backlight_enable(int on, int level, void* data)
1673{ 1673{
1674 struct adb_request req; 1674 struct adb_request req;
@@ -1688,7 +1688,7 @@ pmu_set_backlight_enable(int on, int level, void* data)
1688 return 0; 1688 return 0;
1689} 1689}
1690 1690
1691static void __openfirmware 1691static void
1692pmu_bright_complete(struct adb_request *req) 1692pmu_bright_complete(struct adb_request *req)
1693{ 1693{
1694 if (req == &bright_req_1) 1694 if (req == &bright_req_1)
@@ -1697,7 +1697,7 @@ pmu_bright_complete(struct adb_request *req)
1697 clear_bit(2, &async_req_locks); 1697 clear_bit(2, &async_req_locks);
1698} 1698}
1699 1699
1700static int __openfirmware 1700static int
1701pmu_set_backlight_level(int level, void* data) 1701pmu_set_backlight_level(int level, void* data)
1702{ 1702{
1703 if (vias == NULL) 1703 if (vias == NULL)
@@ -1717,7 +1717,7 @@ pmu_set_backlight_level(int level, void* data)
1717} 1717}
1718#endif /* CONFIG_PMAC_BACKLIGHT */ 1718#endif /* CONFIG_PMAC_BACKLIGHT */
1719 1719
1720void __pmac 1720void
1721pmu_enable_irled(int on) 1721pmu_enable_irled(int on)
1722{ 1722{
1723 struct adb_request req; 1723 struct adb_request req;
@@ -1732,7 +1732,7 @@ pmu_enable_irled(int on)
1732 pmu_wait_complete(&req); 1732 pmu_wait_complete(&req);
1733} 1733}
1734 1734
1735void __pmac 1735void
1736pmu_restart(void) 1736pmu_restart(void)
1737{ 1737{
1738 struct adb_request req; 1738 struct adb_request req;
@@ -1757,7 +1757,7 @@ pmu_restart(void)
1757 ; 1757 ;
1758} 1758}
1759 1759
1760void __pmac 1760void
1761pmu_shutdown(void) 1761pmu_shutdown(void)
1762{ 1762{
1763 struct adb_request req; 1763 struct adb_request req;
@@ -2076,7 +2076,7 @@ pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* n)
2076} 2076}
2077 2077
2078/* Sleep is broadcast last-to-first */ 2078/* Sleep is broadcast last-to-first */
2079static int __pmac 2079static int
2080broadcast_sleep(int when, int fallback) 2080broadcast_sleep(int when, int fallback)
2081{ 2081{
2082 int ret = PBOOK_SLEEP_OK; 2082 int ret = PBOOK_SLEEP_OK;
@@ -2101,7 +2101,7 @@ broadcast_sleep(int when, int fallback)
2101} 2101}
2102 2102
2103/* Wake is broadcast first-to-last */ 2103/* Wake is broadcast first-to-last */
2104static int __pmac 2104static int
2105broadcast_wake(void) 2105broadcast_wake(void)
2106{ 2106{
2107 int ret = PBOOK_SLEEP_OK; 2107 int ret = PBOOK_SLEEP_OK;
@@ -2132,7 +2132,7 @@ static struct pci_save {
2132} *pbook_pci_saves; 2132} *pbook_pci_saves;
2133static int pbook_npci_saves; 2133static int pbook_npci_saves;
2134 2134
2135static void __pmac 2135static void
2136pbook_alloc_pci_save(void) 2136pbook_alloc_pci_save(void)
2137{ 2137{
2138 int npci; 2138 int npci;
@@ -2149,7 +2149,7 @@ pbook_alloc_pci_save(void)
2149 pbook_npci_saves = npci; 2149 pbook_npci_saves = npci;
2150} 2150}
2151 2151
2152static void __pmac 2152static void
2153pbook_free_pci_save(void) 2153pbook_free_pci_save(void)
2154{ 2154{
2155 if (pbook_pci_saves == NULL) 2155 if (pbook_pci_saves == NULL)
@@ -2159,7 +2159,7 @@ pbook_free_pci_save(void)
2159 pbook_npci_saves = 0; 2159 pbook_npci_saves = 0;
2160} 2160}
2161 2161
2162static void __pmac 2162static void
2163pbook_pci_save(void) 2163pbook_pci_save(void)
2164{ 2164{
2165 struct pci_save *ps = pbook_pci_saves; 2165 struct pci_save *ps = pbook_pci_saves;
@@ -2190,7 +2190,7 @@ pbook_pci_save(void)
2190 * during boot, it will be in the pci dev list. If it's disabled at this point 2190 * during boot, it will be in the pci dev list. If it's disabled at this point
2191 * (and it will probably be), then you can't access it's config space. 2191 * (and it will probably be), then you can't access it's config space.
2192 */ 2192 */
2193static void __pmac 2193static void
2194pbook_pci_restore(void) 2194pbook_pci_restore(void)
2195{ 2195{
2196 u16 cmd; 2196 u16 cmd;
@@ -2238,7 +2238,7 @@ pbook_pci_restore(void)
2238 2238
2239#ifdef DEBUG_SLEEP 2239#ifdef DEBUG_SLEEP
2240/* N.B. This doesn't work on the 3400 */ 2240/* N.B. This doesn't work on the 3400 */
2241void __pmac 2241void
2242pmu_blink(int n) 2242pmu_blink(int n)
2243{ 2243{
2244 struct adb_request req; 2244 struct adb_request req;
@@ -2277,9 +2277,9 @@ pmu_blink(int n)
2277 * Put the powerbook to sleep. 2277 * Put the powerbook to sleep.
2278 */ 2278 */
2279 2279
2280static u32 save_via[8] __pmacdata; 2280static u32 save_via[8];
2281 2281
2282static void __pmac 2282static void
2283save_via_state(void) 2283save_via_state(void)
2284{ 2284{
2285 save_via[0] = in_8(&via[ANH]); 2285 save_via[0] = in_8(&via[ANH]);
@@ -2291,7 +2291,7 @@ save_via_state(void)
2291 save_via[6] = in_8(&via[T1CL]); 2291 save_via[6] = in_8(&via[T1CL]);
2292 save_via[7] = in_8(&via[T1CH]); 2292 save_via[7] = in_8(&via[T1CH]);
2293} 2293}
2294static void __pmac 2294static void
2295restore_via_state(void) 2295restore_via_state(void)
2296{ 2296{
2297 out_8(&via[ANH], save_via[0]); 2297 out_8(&via[ANH], save_via[0]);
@@ -2307,7 +2307,7 @@ restore_via_state(void)
2307 out_8(&via[IER], IER_SET | SR_INT | CB1_INT); 2307 out_8(&via[IER], IER_SET | SR_INT | CB1_INT);
2308} 2308}
2309 2309
2310static int __pmac 2310static int
2311pmac_suspend_devices(void) 2311pmac_suspend_devices(void)
2312{ 2312{
2313 int ret; 2313 int ret;
@@ -2397,7 +2397,7 @@ pmac_suspend_devices(void)
2397 return 0; 2397 return 0;
2398} 2398}
2399 2399
2400static int __pmac 2400static int
2401pmac_wakeup_devices(void) 2401pmac_wakeup_devices(void)
2402{ 2402{
2403 mdelay(100); 2403 mdelay(100);
@@ -2436,7 +2436,7 @@ pmac_wakeup_devices(void)
2436#define GRACKLE_NAP (1<<4) 2436#define GRACKLE_NAP (1<<4)
2437#define GRACKLE_SLEEP (1<<3) 2437#define GRACKLE_SLEEP (1<<3)
2438 2438
2439int __pmac 2439int
2440powerbook_sleep_grackle(void) 2440powerbook_sleep_grackle(void)
2441{ 2441{
2442 unsigned long save_l2cr; 2442 unsigned long save_l2cr;
@@ -2520,7 +2520,7 @@ powerbook_sleep_grackle(void)
2520 return 0; 2520 return 0;
2521} 2521}
2522 2522
2523static int __pmac 2523static int
2524powerbook_sleep_Core99(void) 2524powerbook_sleep_Core99(void)
2525{ 2525{
2526 unsigned long save_l2cr; 2526 unsigned long save_l2cr;
@@ -2620,7 +2620,7 @@ powerbook_sleep_Core99(void)
2620#define PB3400_MEM_CTRL 0xf8000000 2620#define PB3400_MEM_CTRL 0xf8000000
2621#define PB3400_MEM_CTRL_SLEEP 0x70 2621#define PB3400_MEM_CTRL_SLEEP 0x70
2622 2622
2623static int __pmac 2623static int
2624powerbook_sleep_3400(void) 2624powerbook_sleep_3400(void)
2625{ 2625{
2626 int ret, i, x; 2626 int ret, i, x;
@@ -2720,9 +2720,9 @@ struct pmu_private {
2720}; 2720};
2721 2721
2722static LIST_HEAD(all_pmu_pvt); 2722static LIST_HEAD(all_pmu_pvt);
2723static DEFINE_SPINLOCK(all_pvt_lock __pmacdata); 2723static DEFINE_SPINLOCK(all_pvt_lock);
2724 2724
2725static void __pmac 2725static void
2726pmu_pass_intr(unsigned char *data, int len) 2726pmu_pass_intr(unsigned char *data, int len)
2727{ 2727{
2728 struct pmu_private *pp; 2728 struct pmu_private *pp;
@@ -2751,7 +2751,7 @@ pmu_pass_intr(unsigned char *data, int len)
2751 spin_unlock_irqrestore(&all_pvt_lock, flags); 2751 spin_unlock_irqrestore(&all_pvt_lock, flags);
2752} 2752}
2753 2753
2754static int __pmac 2754static int
2755pmu_open(struct inode *inode, struct file *file) 2755pmu_open(struct inode *inode, struct file *file)
2756{ 2756{
2757 struct pmu_private *pp; 2757 struct pmu_private *pp;
@@ -2773,7 +2773,7 @@ pmu_open(struct inode *inode, struct file *file)
2773 return 0; 2773 return 0;
2774} 2774}
2775 2775
2776static ssize_t __pmac 2776static ssize_t
2777pmu_read(struct file *file, char __user *buf, 2777pmu_read(struct file *file, char __user *buf,
2778 size_t count, loff_t *ppos) 2778 size_t count, loff_t *ppos)
2779{ 2779{
@@ -2825,14 +2825,14 @@ pmu_read(struct file *file, char __user *buf,
2825 return ret; 2825 return ret;
2826} 2826}
2827 2827
2828static ssize_t __pmac 2828static ssize_t
2829pmu_write(struct file *file, const char __user *buf, 2829pmu_write(struct file *file, const char __user *buf,
2830 size_t count, loff_t *ppos) 2830 size_t count, loff_t *ppos)
2831{ 2831{
2832 return 0; 2832 return 0;
2833} 2833}
2834 2834
2835static unsigned int __pmac 2835static unsigned int
2836pmu_fpoll(struct file *filp, poll_table *wait) 2836pmu_fpoll(struct file *filp, poll_table *wait)
2837{ 2837{
2838 struct pmu_private *pp = filp->private_data; 2838 struct pmu_private *pp = filp->private_data;
@@ -2849,7 +2849,7 @@ pmu_fpoll(struct file *filp, poll_table *wait)
2849 return mask; 2849 return mask;
2850} 2850}
2851 2851
2852static int __pmac 2852static int
2853pmu_release(struct inode *inode, struct file *file) 2853pmu_release(struct inode *inode, struct file *file)
2854{ 2854{
2855 struct pmu_private *pp = file->private_data; 2855 struct pmu_private *pp = file->private_data;
@@ -2874,8 +2874,7 @@ pmu_release(struct inode *inode, struct file *file)
2874 return 0; 2874 return 0;
2875} 2875}
2876 2876
2877/* Note: removed __openfirmware here since it causes link errors */ 2877static int
2878static int __pmac
2879pmu_ioctl(struct inode * inode, struct file *filp, 2878pmu_ioctl(struct inode * inode, struct file *filp,
2880 u_int cmd, u_long arg) 2879 u_int cmd, u_long arg)
2881{ 2880{
@@ -2957,7 +2956,7 @@ pmu_ioctl(struct inode * inode, struct file *filp,
2957 return error; 2956 return error;
2958} 2957}
2959 2958
2960static struct file_operations pmu_device_fops __pmacdata = { 2959static struct file_operations pmu_device_fops = {
2961 .read = pmu_read, 2960 .read = pmu_read,
2962 .write = pmu_write, 2961 .write = pmu_write,
2963 .poll = pmu_fpoll, 2962 .poll = pmu_fpoll,
@@ -2966,7 +2965,7 @@ static struct file_operations pmu_device_fops __pmacdata = {
2966 .release = pmu_release, 2965 .release = pmu_release,
2967}; 2966};
2968 2967
2969static struct miscdevice pmu_device __pmacdata = { 2968static struct miscdevice pmu_device = {
2970 PMU_MINOR, "pmu", &pmu_device_fops 2969 PMU_MINOR, "pmu", &pmu_device_fops
2971}; 2970};
2972 2971
@@ -2982,7 +2981,7 @@ device_initcall(pmu_device_init);
2982 2981
2983 2982
2984#ifdef DEBUG_SLEEP 2983#ifdef DEBUG_SLEEP
2985static inline void __pmac 2984static inline void
2986polled_handshake(volatile unsigned char __iomem *via) 2985polled_handshake(volatile unsigned char __iomem *via)
2987{ 2986{
2988 via[B] &= ~TREQ; eieio(); 2987 via[B] &= ~TREQ; eieio();
@@ -2993,7 +2992,7 @@ polled_handshake(volatile unsigned char __iomem *via)
2993 ; 2992 ;
2994} 2993}
2995 2994
2996static inline void __pmac 2995static inline void
2997polled_send_byte(volatile unsigned char __iomem *via, int x) 2996polled_send_byte(volatile unsigned char __iomem *via, int x)
2998{ 2997{
2999 via[ACR] |= SR_OUT | SR_EXT; eieio(); 2998 via[ACR] |= SR_OUT | SR_EXT; eieio();
@@ -3001,7 +3000,7 @@ polled_send_byte(volatile unsigned char __iomem *via, int x)
3001 polled_handshake(via); 3000 polled_handshake(via);
3002} 3001}
3003 3002
3004static inline int __pmac 3003static inline int
3005polled_recv_byte(volatile unsigned char __iomem *via) 3004polled_recv_byte(volatile unsigned char __iomem *via)
3006{ 3005{
3007 int x; 3006 int x;
@@ -3013,7 +3012,7 @@ polled_recv_byte(volatile unsigned char __iomem *via)
3013 return x; 3012 return x;
3014} 3013}
3015 3014
3016int __pmac 3015int
3017pmu_polled_request(struct adb_request *req) 3016pmu_polled_request(struct adb_request *req)
3018{ 3017{
3019 unsigned long flags; 3018 unsigned long flags;
diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c
index 820dc52e30bc..6f80d76ac17c 100644
--- a/drivers/macintosh/via-pmu68k.c
+++ b/drivers/macintosh/via-pmu68k.c
@@ -835,7 +835,7 @@ static struct pci_save {
835} *pbook_pci_saves; 835} *pbook_pci_saves;
836static int n_pbook_pci_saves; 836static int n_pbook_pci_saves;
837 837
838static inline void __openfirmware 838static inline void
839pbook_pci_save(void) 839pbook_pci_save(void)
840{ 840{
841 int npci; 841 int npci;
@@ -863,7 +863,7 @@ pbook_pci_save(void)
863 } 863 }
864} 864}
865 865
866static inline void __openfirmware 866static inline void
867pbook_pci_restore(void) 867pbook_pci_restore(void)
868{ 868{
869 u16 cmd; 869 u16 cmd;
@@ -902,7 +902,7 @@ pbook_pci_restore(void)
902#define IRQ_ENABLE ((unsigned int *)0xf3000024) 902#define IRQ_ENABLE ((unsigned int *)0xf3000024)
903#define MEM_CTRL ((unsigned int *)0xf8000070) 903#define MEM_CTRL ((unsigned int *)0xf8000070)
904 904
905int __openfirmware powerbook_sleep(void) 905int powerbook_sleep(void)
906{ 906{
907 int ret, i, x; 907 int ret, i, x;
908 static int save_backlight; 908 static int save_backlight;
@@ -1001,25 +1001,24 @@ int __openfirmware powerbook_sleep(void)
1001/* 1001/*
1002 * Support for /dev/pmu device 1002 * Support for /dev/pmu device
1003 */ 1003 */
1004static int __openfirmware pmu_open(struct inode *inode, struct file *file) 1004static int pmu_open(struct inode *inode, struct file *file)
1005{ 1005{
1006 return 0; 1006 return 0;
1007} 1007}
1008 1008
1009static ssize_t __openfirmware pmu_read(struct file *file, char *buf, 1009static ssize_t pmu_read(struct file *file, char *buf,
1010 size_t count, loff_t *ppos) 1010 size_t count, loff_t *ppos)
1011{ 1011{
1012 return 0; 1012 return 0;
1013} 1013}
1014 1014
1015static ssize_t __openfirmware pmu_write(struct file *file, const char *buf, 1015static ssize_t pmu_write(struct file *file, const char *buf,
1016 size_t count, loff_t *ppos) 1016 size_t count, loff_t *ppos)
1017{ 1017{
1018 return 0; 1018 return 0;
1019} 1019}
1020 1020
1021/* Note: removed __openfirmware here since it causes link errors */ 1021static int pmu_ioctl(struct inode * inode, struct file *filp,
1022static int /*__openfirmware*/ pmu_ioctl(struct inode * inode, struct file *filp,
1023 u_int cmd, u_long arg) 1022 u_int cmd, u_long arg)
1024{ 1023{
1025 int error; 1024 int error;