Commit 872758563d7f132d25fc06857bd19df06c5c70c7
Committed by
Paul Mackerras
1 parent
9ea8b7c96f
Exists in
master
and in
20 other branches
[POWERPC] move variables in drivers/macintosh to bss
Move all the initialized variables to bss. Mark a version string as const. Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Showing 9 changed files with 24 additions and 25 deletions Side-by-side Diff
drivers/macintosh/adbhid.c
... | ... | @@ -574,8 +574,8 @@ |
574 | 574 | static int leds_pending[16]; |
575 | 575 | static int leds_req_pending; |
576 | 576 | static int pending_devs[16]; |
577 | -static int pending_led_start=0; | |
578 | -static int pending_led_end=0; | |
577 | +static int pending_led_start; | |
578 | +static int pending_led_end; | |
579 | 579 | static DEFINE_SPINLOCK(leds_lock); |
580 | 580 | |
581 | 581 | static void leds_done(struct adb_request *req) |
drivers/macintosh/apm_emu.c
drivers/macintosh/mac_hid.c
... | ... | @@ -17,10 +17,10 @@ |
17 | 17 | |
18 | 18 | static struct input_dev *emumousebtn; |
19 | 19 | static int emumousebtn_input_register(void); |
20 | -static int mouse_emulate_buttons = 0; | |
20 | +static int mouse_emulate_buttons; | |
21 | 21 | static int mouse_button2_keycode = KEY_RIGHTCTRL; /* right control key */ |
22 | 22 | static int mouse_button3_keycode = KEY_RIGHTALT; /* right option key */ |
23 | -static int mouse_last_keycode = 0; | |
23 | +static int mouse_last_keycode; | |
24 | 24 | |
25 | 25 | #if defined(CONFIG_SYSCTL) |
26 | 26 | /* file(s) in /proc/sys/dev/mac_hid */ |
drivers/macintosh/therm_adt746x.c
... | ... | @@ -48,11 +48,11 @@ |
48 | 48 | |
49 | 49 | static u8 default_limits_local[3] = {70, 50, 70}; /* local, sensor1, sensor2 */ |
50 | 50 | static u8 default_limits_chip[3] = {80, 65, 80}; /* local, sensor1, sensor2 */ |
51 | -static const char *sensor_location[3] = {NULL, NULL, NULL}; | |
51 | +static const char *sensor_location[3]; | |
52 | 52 | |
53 | -static int limit_adjust = 0; | |
53 | +static int limit_adjust; | |
54 | 54 | static int fan_speed = -1; |
55 | -static int verbose = 0; | |
55 | +static int verbose; | |
56 | 56 | |
57 | 57 | MODULE_AUTHOR("Colin Leroy <colin@colino.net>"); |
58 | 58 | MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and " |
drivers/macintosh/via-cuda.c
drivers/macintosh/via-macii.c
... | ... | @@ -107,10 +107,10 @@ |
107 | 107 | awaiting_reply |
108 | 108 | } macii_state; |
109 | 109 | |
110 | -static int need_poll = 0; | |
111 | -static int command_byte = 0; | |
112 | -static int last_reply = 0; | |
113 | -static int last_active = 0; | |
110 | +static int need_poll; | |
111 | +static int command_byte; | |
112 | +static int last_reply; | |
113 | +static int last_active; | |
114 | 114 | |
115 | 115 | static struct adb_request *current_req; |
116 | 116 | static struct adb_request *last_req; |
... | ... | @@ -124,7 +124,7 @@ |
124 | 124 | static int prefix_len; |
125 | 125 | static int status = ST_IDLE|TREQ; |
126 | 126 | static int last_status; |
127 | -static int driver_running = 0; | |
127 | +static int driver_running; | |
128 | 128 | |
129 | 129 | /* debug level 10 required for ADB logging (should be && debug_adb, ideally) */ |
130 | 130 |
drivers/macintosh/via-maciisi.c
... | ... | @@ -63,10 +63,10 @@ |
63 | 63 | |
64 | 64 | #undef DEBUG_MACIISI_ADB |
65 | 65 | |
66 | -static struct adb_request* current_req = NULL; | |
67 | -static struct adb_request* last_req = NULL; | |
66 | +static struct adb_request* current_req; | |
67 | +static struct adb_request* last_req; | |
68 | 68 | static unsigned char maciisi_rbuf[16]; |
69 | -static unsigned char *reply_ptr = NULL; | |
69 | +static unsigned char *reply_ptr; | |
70 | 70 | static int data_index; |
71 | 71 | static int reading_reply; |
72 | 72 | static int reply_len; |
drivers/macintosh/via-pmu.c
... | ... | @@ -141,13 +141,13 @@ |
141 | 141 | static volatile int disable_poll; |
142 | 142 | static struct device_node *vias; |
143 | 143 | static int pmu_kind = PMU_UNKNOWN; |
144 | -static int pmu_fully_inited = 0; | |
144 | +static int pmu_fully_inited; | |
145 | 145 | static int pmu_has_adb; |
146 | 146 | static struct device_node *gpio_node; |
147 | -static unsigned char __iomem *gpio_reg = NULL; | |
147 | +static unsigned char __iomem *gpio_reg; | |
148 | 148 | static int gpio_irq = NO_IRQ; |
149 | 149 | static int gpio_irq_enabled = -1; |
150 | -static volatile int pmu_suspended = 0; | |
150 | +static volatile int pmu_suspended; | |
151 | 151 | static spinlock_t pmu_lock; |
152 | 152 | static u8 pmu_intr_mask; |
153 | 153 | static int pmu_version; |
... | ... | @@ -180,7 +180,7 @@ |
180 | 180 | BLOCKING_NOTIFIER_HEAD(sleep_notifier_list); |
181 | 181 | |
182 | 182 | #ifdef CONFIG_ADB |
183 | -static int adb_dev_map = 0; | |
183 | +static int adb_dev_map; | |
184 | 184 | static int pmu_adb_flags; |
185 | 185 | |
186 | 186 | static int pmu_probe(void); |
... | ... | @@ -2776,7 +2776,7 @@ |
2776 | 2776 | |
2777 | 2777 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) |
2778 | 2778 | |
2779 | -static int pmu_sys_suspended = 0; | |
2779 | +static int pmu_sys_suspended; | |
2780 | 2780 | |
2781 | 2781 | static int pmu_sys_suspend(struct sys_device *sysdev, pm_message_t state) |
2782 | 2782 | { |
... | ... | @@ -2816,7 +2816,6 @@ |
2816 | 2816 | }; |
2817 | 2817 | |
2818 | 2818 | static struct sys_device device_pmu = { |
2819 | - .id = 0, | |
2820 | 2819 | .cls = &pmu_sysclass, |
2821 | 2820 | }; |
2822 | 2821 |
drivers/macintosh/via-pmu68k.c
... | ... | @@ -96,10 +96,10 @@ |
96 | 96 | static int data_len; |
97 | 97 | static int adb_int_pending; |
98 | 98 | static int pmu_adb_flags; |
99 | -static int adb_dev_map = 0; | |
99 | +static int adb_dev_map; | |
100 | 100 | static struct adb_request bright_req_1, bright_req_2, bright_req_3; |
101 | 101 | static int pmu_kind = PMU_UNKNOWN; |
102 | -static int pmu_fully_inited = 0; | |
102 | +static int pmu_fully_inited; | |
103 | 103 | |
104 | 104 | int asleep; |
105 | 105 | BLOCKING_NOTIFIER_HEAD(sleep_notifier_list); |