Skip to content

Commit

Permalink
[POWERPC] move variables in drivers/macintosh to bss
Browse files Browse the repository at this point in the history
Move all the initialized variables to bss.
Mark a version string as const.

Signed-off-by: Olaf Hering <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
  • Loading branch information
olafhering authored and paulusmack committed Feb 13, 2007
1 parent 9ea8b7c commit 8727585
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 25 deletions.
4 changes: 2 additions & 2 deletions drivers/macintosh/adbhid.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,8 @@ static struct adb_request led_request;
static int leds_pending[16];
static int leds_req_pending;
static int pending_devs[16];
static int pending_led_start=0;
static int pending_led_end=0;
static int pending_led_start;
static int pending_led_end;
static DEFINE_SPINLOCK(leds_lock);

static void leds_done(struct adb_request *req)
Expand Down
2 changes: 1 addition & 1 deletion drivers/macintosh/apm_emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static struct pmu_sleep_notifier apm_sleep_notifier = {
SLEEP_LEVEL_USERLAND,
};

static char driver_version[] = "0.5"; /* no spaces */
static const char driver_version[] = "0.5"; /* no spaces */

#ifdef DEBUG
static char * apm_event_name[] = {
Expand Down
4 changes: 2 additions & 2 deletions drivers/macintosh/mac_hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

static struct input_dev *emumousebtn;
static int emumousebtn_input_register(void);
static int mouse_emulate_buttons = 0;
static int mouse_emulate_buttons;
static int mouse_button2_keycode = KEY_RIGHTCTRL; /* right control key */
static int mouse_button3_keycode = KEY_RIGHTALT; /* right option key */
static int mouse_last_keycode = 0;
static int mouse_last_keycode;

#if defined(CONFIG_SYSCTL)
/* file(s) in /proc/sys/dev/mac_hid */
Expand Down
6 changes: 3 additions & 3 deletions drivers/macintosh/therm_adt746x.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ static u8 FAN_SPD_SET[2] = {0x30, 0x31};

static u8 default_limits_local[3] = {70, 50, 70}; /* local, sensor1, sensor2 */
static u8 default_limits_chip[3] = {80, 65, 80}; /* local, sensor1, sensor2 */
static const char *sensor_location[3] = {NULL, NULL, NULL};
static const char *sensor_location[3];

static int limit_adjust = 0;
static int limit_adjust;
static int fan_speed = -1;
static int verbose = 0;
static int verbose;

MODULE_AUTHOR("Colin Leroy <[email protected]>");
MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and "
Expand Down
2 changes: 1 addition & 1 deletion drivers/macintosh/via-cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static int data_index;
#ifdef CONFIG_PPC
static struct device_node *vias;
#endif
static int cuda_fully_inited = 0;
static int cuda_fully_inited;

#ifdef CONFIG_ADB
static int cuda_probe(void);
Expand Down
10 changes: 5 additions & 5 deletions drivers/macintosh/via-macii.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ static enum macii_state {
awaiting_reply
} macii_state;

static int need_poll = 0;
static int command_byte = 0;
static int last_reply = 0;
static int last_active = 0;
static int need_poll;
static int command_byte;
static int last_reply;
static int last_active;

static struct adb_request *current_req;
static struct adb_request *last_req;
Expand All @@ -124,7 +124,7 @@ static int first_byte;
static int prefix_len;
static int status = ST_IDLE|TREQ;
static int last_status;
static int driver_running = 0;
static int driver_running;

/* debug level 10 required for ADB logging (should be && debug_adb, ideally) */

Expand Down
6 changes: 3 additions & 3 deletions drivers/macintosh/via-maciisi.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ static volatile unsigned char *via;

#undef DEBUG_MACIISI_ADB

static struct adb_request* current_req = NULL;
static struct adb_request* last_req = NULL;
static struct adb_request* current_req;
static struct adb_request* last_req;
static unsigned char maciisi_rbuf[16];
static unsigned char *reply_ptr = NULL;
static unsigned char *reply_ptr;
static int data_index;
static int reading_reply;
static int reply_len;
Expand Down
11 changes: 5 additions & 6 deletions drivers/macintosh/via-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ static volatile int adb_int_pending;
static volatile int disable_poll;
static struct device_node *vias;
static int pmu_kind = PMU_UNKNOWN;
static int pmu_fully_inited = 0;
static int pmu_fully_inited;
static int pmu_has_adb;
static struct device_node *gpio_node;
static unsigned char __iomem *gpio_reg = NULL;
static unsigned char __iomem *gpio_reg;
static int gpio_irq = NO_IRQ;
static int gpio_irq_enabled = -1;
static volatile int pmu_suspended = 0;
static volatile int pmu_suspended;
static spinlock_t pmu_lock;
static u8 pmu_intr_mask;
static int pmu_version;
Expand Down Expand Up @@ -180,7 +180,7 @@ int asleep;
BLOCKING_NOTIFIER_HEAD(sleep_notifier_list);

#ifdef CONFIG_ADB
static int adb_dev_map = 0;
static int adb_dev_map;
static int pmu_adb_flags;

static int pmu_probe(void);
Expand Down Expand Up @@ -2776,7 +2776,7 @@ pmu_polled_request(struct adb_request *req)

#if defined(CONFIG_PM) && defined(CONFIG_PPC32)

static int pmu_sys_suspended = 0;
static int pmu_sys_suspended;

static int pmu_sys_suspend(struct sys_device *sysdev, pm_message_t state)
{
Expand Down Expand Up @@ -2816,7 +2816,6 @@ static struct sysdev_class pmu_sysclass = {
};

static struct sys_device device_pmu = {
.id = 0,
.cls = &pmu_sysclass,
};

Expand Down
4 changes: 2 additions & 2 deletions drivers/macintosh/via-pmu68k.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ static int data_index;
static int data_len;
static int adb_int_pending;
static int pmu_adb_flags;
static int adb_dev_map = 0;
static int adb_dev_map;
static struct adb_request bright_req_1, bright_req_2, bright_req_3;
static int pmu_kind = PMU_UNKNOWN;
static int pmu_fully_inited = 0;
static int pmu_fully_inited;

int asleep;
BLOCKING_NOTIFIER_HEAD(sleep_notifier_list);
Expand Down

0 comments on commit 8727585

Please sign in to comment.