diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/Kconfig | 2 | ||||
-rw-r--r-- | drivers/macintosh/adb.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/adbhid.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/ans-lcd.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/apm_emu.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/mac_hid.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/nvram.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/rack-meter.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/smu.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/therm_adt746x.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/via-cuda.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/via-macii.c | 10 | ||||
-rw-r--r-- | drivers/macintosh/via-maciisi.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu.c | 16 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu68k.c | 6 |
15 files changed, 36 insertions, 38 deletions
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index a9e747c3979..1a86387e23b 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig @@ -1,6 +1,6 @@ menu "Macintosh device drivers" - depends on PPC || MAC + depends on PPC || MAC || X86 config ADB bool "Apple Desktop Bus (ADB) support" diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index 7cec6de5e2b..f729eebf771 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c @@ -885,7 +885,7 @@ out: return ret; } -static struct file_operations adb_fops = { +static const struct file_operations adb_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = adb_read, diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index 1c7d6f221b5..b77ef5187d6 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c @@ -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) diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c index 2b8a6e821d4..cdd5a0f72e3 100644 --- a/drivers/macintosh/ans-lcd.c +++ b/drivers/macintosh/ans-lcd.c @@ -121,7 +121,7 @@ anslcd_open( struct inode * inode, struct file * file ) return 0; } -struct file_operations anslcd_fops = { +const struct file_operations anslcd_fops = { .write = anslcd_write, .ioctl = anslcd_ioctl, .open = anslcd_open, diff --git a/drivers/macintosh/apm_emu.c b/drivers/macintosh/apm_emu.c index 4300c628f8a..c5e4d43f97f 100644 --- a/drivers/macintosh/apm_emu.c +++ b/drivers/macintosh/apm_emu.c @@ -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[] = { @@ -501,7 +501,7 @@ static int apm_emu_get_info(char *buf, char **start, off_t fpos, int length) return p - buf; } -static struct file_operations apm_bios_fops = { +static const struct file_operations apm_bios_fops = { .owner = THIS_MODULE, .read = do_read, .poll = do_poll, diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index ee6b4ca6913..f632cec9ce4 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -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 */ diff --git a/drivers/macintosh/nvram.c b/drivers/macintosh/nvram.c index 30791875fc9..b195d753d2e 100644 --- a/drivers/macintosh/nvram.c +++ b/drivers/macintosh/nvram.c @@ -100,7 +100,7 @@ static int nvram_ioctl(struct inode *inode, struct file *file, return 0; } -struct file_operations nvram_fops = { +const struct file_operations nvram_fops = { .owner = THIS_MODULE, .llseek = nvram_llseek, .read = read_nvram, diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 5ed41fe84e5..f83fad2a3ff 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c @@ -171,11 +171,11 @@ static void rackmeter_setup_dbdma(struct rackmeter *rm) /* Make sure dbdma is reset */ DBDMA_DO_RESET(rm->dma_regs); - pr_debug("rackmeter: mark offset=0x%lx\n", + pr_debug("rackmeter: mark offset=0x%zx\n", offsetof(struct rackmeter_dma, mark)); - pr_debug("rackmeter: buf1 offset=0x%lx\n", + pr_debug("rackmeter: buf1 offset=0x%zx\n", offsetof(struct rackmeter_dma, buf1)); - pr_debug("rackmeter: buf2 offset=0x%lx\n", + pr_debug("rackmeter: buf2 offset=0x%zx\n", offsetof(struct rackmeter_dma, buf2)); /* Prepare 4 dbdma commands for the 2 buffers */ diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 6f30459b938..3096836d8bd 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c @@ -1277,7 +1277,7 @@ static int smu_release(struct inode *inode, struct file *file) } -static struct file_operations smu_device_fops = { +static const struct file_operations smu_device_fops = { .llseek = no_llseek, .read = smu_read, .write = smu_write, diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 3d3bf1643e7..a7ce5592663 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c @@ -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 <colin@colino.net>"); MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and " diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c index df66291b132..3797f503cd6 100644 --- a/drivers/macintosh/via-cuda.c +++ b/drivers/macintosh/via-cuda.c @@ -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); diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c index 5d88d5b0ad9..175b3e56e37 100644 --- a/drivers/macintosh/via-macii.c +++ b/drivers/macintosh/via-macii.c @@ -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; @@ -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) */ diff --git a/drivers/macintosh/via-maciisi.c b/drivers/macintosh/via-maciisi.c index 1f0aa5dc9aa..10051db48d2 100644 --- a/drivers/macintosh/via-maciisi.c +++ b/drivers/macintosh/via-maciisi.c @@ -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; diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 8ca75e52f63..b6073bdb50c 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -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; @@ -169,7 +169,7 @@ static int option_server_mode; int pmu_battery_count; int pmu_cur_battery; -unsigned int pmu_power_flags; +unsigned int pmu_power_flags = PMU_PWR_AC_PRESENT; struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES]; static int query_batt_timer = BATTERY_POLLING_COUNT; static struct adb_request batt_req; @@ -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); @@ -516,7 +516,6 @@ static int __init via_pmu_dev_init(void) proc_get_irqstats, NULL); proc_pmu_options = create_proc_entry("options", 0600, proc_pmu_root); if (proc_pmu_options) { - proc_pmu_options->nlink = 1; proc_pmu_options->read_proc = proc_read_options; proc_pmu_options->write_proc = proc_write_options; } @@ -2673,7 +2672,7 @@ pmu_ioctl(struct inode * inode, struct file *filp, return error; } -static struct file_operations pmu_device_fops = { +static const struct file_operations pmu_device_fops = { .read = pmu_read, .write = pmu_write, .poll = pmu_fpoll, @@ -2777,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) { @@ -2817,7 +2816,6 @@ static struct sysdev_class pmu_sysclass = { }; static struct sys_device device_pmu = { - .id = 0, .cls = &pmu_sysclass, }; diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c index 93e6ef9233f..54baee57d2f 100644 --- a/drivers/macintosh/via-pmu68k.c +++ b/drivers/macintosh/via-pmu68k.c @@ -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); @@ -1040,7 +1040,7 @@ static int pmu_ioctl(struct inode * inode, struct file *filp, return -EINVAL; } -static struct file_operations pmu_device_fops = { +static const struct file_operations pmu_device_fops = { .read = pmu_read, .write = pmu_write, .ioctl = pmu_ioctl, |