diff options
Diffstat (limited to 'drivers/char')
| -rw-r--r-- | drivers/char/agp/Kconfig | 3 | ||||
| -rw-r--r-- | drivers/char/agp/hp-agp.c | 2 | ||||
| -rw-r--r-- | drivers/char/hpet.c | 5 | ||||
| -rw-r--r-- | drivers/char/hvc_console.c | 4 | ||||
| -rw-r--r-- | drivers/char/hvc_rtas.c | 37 | ||||
| -rw-r--r-- | drivers/char/hvsi.c | 2 | ||||
| -rw-r--r-- | drivers/char/ipmi/ipmi_watchdog.c | 25 | ||||
| -rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 54 | ||||
| -rw-r--r-- | drivers/char/rtc.c | 4 | ||||
| -rw-r--r-- | drivers/char/sonypi.c | 10 | ||||
| -rw-r--r-- | drivers/char/tty_io.c | 11 | ||||
| -rw-r--r-- | drivers/char/viotape.c | 2 |
12 files changed, 71 insertions, 88 deletions
diff --git a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig index 7c88c060a9e6..46685a540772 100644 --- a/drivers/char/agp/Kconfig +++ b/drivers/char/agp/Kconfig | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | config AGP | 1 | config AGP |
| 2 | tristate "/dev/agpgart (AGP Support)" if !GART_IOMMU | 2 | tristate "/dev/agpgart (AGP Support)" |
| 3 | depends on ALPHA || IA64 || PPC || X86 | 3 | depends on ALPHA || IA64 || PPC || X86 |
| 4 | default y if GART_IOMMU | ||
| 5 | ---help--- | 4 | ---help--- |
| 6 | AGP (Accelerated Graphics Port) is a bus system mainly used to | 5 | AGP (Accelerated Graphics Port) is a bus system mainly used to |
| 7 | connect graphics cards to the rest of the system. | 6 | connect graphics cards to the rest of the system. |
diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c index 8c4c6ef748ec..907fb66ec4a9 100644 --- a/drivers/char/agp/hp-agp.c +++ b/drivers/char/agp/hp-agp.c | |||
| @@ -497,7 +497,7 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) | |||
| 497 | info = buffer.pointer; | 497 | info = buffer.pointer; |
| 498 | info->hardware_id.value[sizeof(info->hardware_id)-1] = '\0'; | 498 | info->hardware_id.value[sizeof(info->hardware_id)-1] = '\0'; |
| 499 | match = (strcmp(info->hardware_id.value, "HWP0001") == 0); | 499 | match = (strcmp(info->hardware_id.value, "HWP0001") == 0); |
| 500 | ACPI_MEM_FREE(info); | 500 | kfree(info); |
| 501 | if (match) { | 501 | if (match) { |
| 502 | status = hp_acpi_csr_space(handle, &sba_hpa, &length); | 502 | status = hp_acpi_csr_space(handle, &sba_hpa, &length); |
| 503 | if (ACPI_SUCCESS(status)) | 503 | if (ACPI_SUCCESS(status)) |
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index ef140ebde117..07473cd84121 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
| @@ -925,11 +925,8 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data) | |||
| 925 | status = acpi_resource_to_address64(res, &addr); | 925 | status = acpi_resource_to_address64(res, &addr); |
| 926 | 926 | ||
| 927 | if (ACPI_SUCCESS(status)) { | 927 | if (ACPI_SUCCESS(status)) { |
| 928 | unsigned long size; | ||
| 929 | |||
| 930 | size = addr.maximum - addr.minimum + 1; | ||
| 931 | hdp->hd_phys_address = addr.minimum; | 928 | hdp->hd_phys_address = addr.minimum; |
| 932 | hdp->hd_address = ioremap(addr.minimum, size); | 929 | hdp->hd_address = ioremap(addr.minimum, addr.address_length); |
| 933 | 930 | ||
| 934 | if (hpet_is_known(hdp)) { | 931 | if (hpet_is_known(hdp)) { |
| 935 | printk(KERN_DEBUG "%s: 0x%lx is busy\n", | 932 | printk(KERN_DEBUG "%s: 0x%lx is busy\n", |
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index 2b6a56b2bf35..a5c6a9d7ff08 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
| @@ -553,7 +553,6 @@ static int hvc_chars_in_buffer(struct tty_struct *tty) | |||
| 553 | 553 | ||
| 554 | #define HVC_POLL_READ 0x00000001 | 554 | #define HVC_POLL_READ 0x00000001 |
| 555 | #define HVC_POLL_WRITE 0x00000002 | 555 | #define HVC_POLL_WRITE 0x00000002 |
| 556 | #define HVC_POLL_QUICK 0x00000004 | ||
| 557 | 556 | ||
| 558 | static int hvc_poll(struct hvc_struct *hp) | 557 | static int hvc_poll(struct hvc_struct *hp) |
| 559 | { | 558 | { |
| @@ -568,6 +567,7 @@ static int hvc_poll(struct hvc_struct *hp) | |||
| 568 | /* Push pending writes */ | 567 | /* Push pending writes */ |
| 569 | if (hp->n_outbuf > 0) | 568 | if (hp->n_outbuf > 0) |
| 570 | hvc_push(hp); | 569 | hvc_push(hp); |
| 570 | |||
| 571 | /* Reschedule us if still some write pending */ | 571 | /* Reschedule us if still some write pending */ |
| 572 | if (hp->n_outbuf > 0) | 572 | if (hp->n_outbuf > 0) |
| 573 | poll_mask |= HVC_POLL_WRITE; | 573 | poll_mask |= HVC_POLL_WRITE; |
| @@ -680,7 +680,7 @@ int khvcd(void *unused) | |||
| 680 | poll_mask |= HVC_POLL_READ; | 680 | poll_mask |= HVC_POLL_READ; |
| 681 | if (hvc_kicked) | 681 | if (hvc_kicked) |
| 682 | continue; | 682 | continue; |
| 683 | if (poll_mask & HVC_POLL_QUICK) { | 683 | if (poll_mask & HVC_POLL_WRITE) { |
| 684 | yield(); | 684 | yield(); |
| 685 | continue; | 685 | continue; |
| 686 | } | 686 | } |
diff --git a/drivers/char/hvc_rtas.c b/drivers/char/hvc_rtas.c index 83364ea63cba..57106e02fd2e 100644 --- a/drivers/char/hvc_rtas.c +++ b/drivers/char/hvc_rtas.c | |||
| @@ -41,37 +41,28 @@ | |||
| 41 | #define hvc_rtas_cookie 0x67781e15 | 41 | #define hvc_rtas_cookie 0x67781e15 |
| 42 | struct hvc_struct *hvc_rtas_dev; | 42 | struct hvc_struct *hvc_rtas_dev; |
| 43 | 43 | ||
| 44 | #define RTASCONS_PUT_ATTEMPTS 16 | ||
| 45 | |||
| 46 | static int rtascons_put_char_token = RTAS_UNKNOWN_SERVICE; | 44 | static int rtascons_put_char_token = RTAS_UNKNOWN_SERVICE; |
| 47 | static int rtascons_get_char_token = RTAS_UNKNOWN_SERVICE; | 45 | static int rtascons_get_char_token = RTAS_UNKNOWN_SERVICE; |
| 48 | static int rtascons_put_delay = 100; | ||
| 49 | module_param_named(put_delay, rtascons_put_delay, int, 0644); | ||
| 50 | 46 | ||
| 51 | static inline int hvc_rtas_write_console(uint32_t vtermno, const char *buf, int count) | 47 | static inline int hvc_rtas_write_console(uint32_t vtermno, const char *buf, |
| 48 | int count) | ||
| 52 | { | 49 | { |
| 53 | int done; | 50 | int i; |
| 54 | 51 | ||
| 55 | /* if there is more than one character to be displayed, wait a bit */ | 52 | for (i = 0; i < count; i++) { |
| 56 | for (done = 0; done < count; done++) { | 53 | if (rtas_call(rtascons_put_char_token, 1, 1, NULL, buf[i])) |
| 57 | int result; | ||
| 58 | result = rtas_call(rtascons_put_char_token, 1, 1, NULL, buf[done]); | ||
| 59 | if (result) | ||
| 60 | break; | 54 | break; |
| 61 | } | 55 | } |
| 62 | /* the calling routine expects to receive the number of bytes sent */ | 56 | |
| 63 | return done; | 57 | return i; |
| 64 | } | 58 | } |
| 65 | 59 | ||
| 66 | static int hvc_rtas_read_console(uint32_t vtermno, char *buf, int count) | 60 | static int hvc_rtas_read_console(uint32_t vtermno, char *buf, int count) |
| 67 | { | 61 | { |
| 68 | int i; | 62 | int i, c; |
| 69 | 63 | ||
| 70 | for (i = 0; i < count; i++) { | 64 | for (i = 0; i < count; i++) { |
| 71 | int c, err; | 65 | if (rtas_call(rtascons_get_char_token, 0, 2, &c)) |
| 72 | |||
| 73 | err = rtas_call(rtascons_get_char_token, 0, 2, &c); | ||
| 74 | if (err) | ||
| 75 | break; | 66 | break; |
| 76 | 67 | ||
| 77 | buf[i] = c; | 68 | buf[i] = c; |
| @@ -106,7 +97,9 @@ static int hvc_rtas_init(void) | |||
| 106 | hp = hvc_alloc(hvc_rtas_cookie, NO_IRQ, &hvc_rtas_get_put_ops); | 97 | hp = hvc_alloc(hvc_rtas_cookie, NO_IRQ, &hvc_rtas_get_put_ops); |
| 107 | if (IS_ERR(hp)) | 98 | if (IS_ERR(hp)) |
| 108 | return PTR_ERR(hp); | 99 | return PTR_ERR(hp); |
| 100 | |||
| 109 | hvc_rtas_dev = hp; | 101 | hvc_rtas_dev = hp; |
| 102 | |||
| 110 | return 0; | 103 | return 0; |
| 111 | } | 104 | } |
| 112 | module_init(hvc_rtas_init); | 105 | module_init(hvc_rtas_init); |
| @@ -114,8 +107,8 @@ module_init(hvc_rtas_init); | |||
| 114 | /* This will tear down the tty portion of the driver */ | 107 | /* This will tear down the tty portion of the driver */ |
| 115 | static void __exit hvc_rtas_exit(void) | 108 | static void __exit hvc_rtas_exit(void) |
| 116 | { | 109 | { |
| 117 | /* Really the fun isn't over until the worker thread breaks down and the | 110 | /* Really the fun isn't over until the worker thread breaks down and |
| 118 | * tty cleans up */ | 111 | * the tty cleans up */ |
| 119 | if (hvc_rtas_dev) | 112 | if (hvc_rtas_dev) |
| 120 | hvc_remove(hvc_rtas_dev); | 113 | hvc_remove(hvc_rtas_dev); |
| 121 | } | 114 | } |
| @@ -127,12 +120,14 @@ static int hvc_rtas_console_init(void) | |||
| 127 | rtascons_put_char_token = rtas_token("put-term-char"); | 120 | rtascons_put_char_token = rtas_token("put-term-char"); |
| 128 | if (rtascons_put_char_token == RTAS_UNKNOWN_SERVICE) | 121 | if (rtascons_put_char_token == RTAS_UNKNOWN_SERVICE) |
| 129 | return -EIO; | 122 | return -EIO; |
| 123 | |||
| 130 | rtascons_get_char_token = rtas_token("get-term-char"); | 124 | rtascons_get_char_token = rtas_token("get-term-char"); |
| 131 | if (rtascons_get_char_token == RTAS_UNKNOWN_SERVICE) | 125 | if (rtascons_get_char_token == RTAS_UNKNOWN_SERVICE) |
| 132 | return -EIO; | 126 | return -EIO; |
| 133 | 127 | ||
| 134 | hvc_instantiate(hvc_rtas_cookie, 0, &hvc_rtas_get_put_ops ); | 128 | hvc_instantiate(hvc_rtas_cookie, 0, &hvc_rtas_get_put_ops); |
| 135 | add_preferred_console("hvc", 0, NULL); | 129 | add_preferred_console("hvc", 0, NULL); |
| 130 | |||
| 136 | return 0; | 131 | return 0; |
| 137 | } | 132 | } |
| 138 | console_initcall(hvc_rtas_console_init); | 133 | console_initcall(hvc_rtas_console_init); |
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index a9522189fc9e..a0370ed752ce 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c | |||
| @@ -1179,7 +1179,7 @@ static int __init hvsi_init(void) | |||
| 1179 | if (tty_register_driver(hvsi_driver)) | 1179 | if (tty_register_driver(hvsi_driver)) |
| 1180 | panic("Couldn't register hvsi console driver\n"); | 1180 | panic("Couldn't register hvsi console driver\n"); |
| 1181 | 1181 | ||
| 1182 | printk(KERN_INFO "HVSI: registered %i devices\n", hvsi_count); | 1182 | printk(KERN_DEBUG "HVSI: registered %i devices\n", hvsi_count); |
| 1183 | 1183 | ||
| 1184 | return 0; | 1184 | return 0; |
| 1185 | } | 1185 | } |
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 2d11ddd99e55..8f8867170973 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c | |||
| @@ -212,24 +212,16 @@ static int set_param_str(const char *val, struct kernel_param *kp) | |||
| 212 | { | 212 | { |
| 213 | action_fn fn = (action_fn) kp->arg; | 213 | action_fn fn = (action_fn) kp->arg; |
| 214 | int rv = 0; | 214 | int rv = 0; |
| 215 | const char *end; | 215 | char *dup, *s; |
| 216 | char valcp[16]; | 216 | |
| 217 | int len; | 217 | dup = kstrdup(val, GFP_KERNEL); |
| 218 | 218 | if (!dup) | |
| 219 | /* Truncate leading and trailing spaces. */ | 219 | return -ENOMEM; |
| 220 | while (isspace(*val)) | 220 | |
| 221 | val++; | 221 | s = strstrip(dup); |
| 222 | end = val + strlen(val) - 1; | ||
| 223 | while ((end >= val) && isspace(*end)) | ||
| 224 | end--; | ||
| 225 | len = end - val + 1; | ||
| 226 | if (len > sizeof(valcp) - 1) | ||
| 227 | return -EINVAL; | ||
| 228 | memcpy(valcp, val, len); | ||
| 229 | valcp[len] = '\0'; | ||
| 230 | 222 | ||
| 231 | down_read(®ister_sem); | 223 | down_read(®ister_sem); |
| 232 | rv = fn(valcp, NULL); | 224 | rv = fn(s, NULL); |
| 233 | if (rv) | 225 | if (rv) |
| 234 | goto out_unlock; | 226 | goto out_unlock; |
| 235 | 227 | ||
| @@ -239,6 +231,7 @@ static int set_param_str(const char *val, struct kernel_param *kp) | |||
| 239 | 231 | ||
| 240 | out_unlock: | 232 | out_unlock: |
| 241 | up_read(®ister_sem); | 233 | up_read(®ister_sem); |
| 234 | kfree(dup); | ||
| 242 | return rv; | 235 | return rv; |
| 243 | } | 236 | } |
| 244 | 237 | ||
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 07213454c458..0c141c295fb6 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
| @@ -844,7 +844,7 @@ static int bh_action(MGSLPC_INFO *info) | |||
| 844 | return rc; | 844 | return rc; |
| 845 | } | 845 | } |
| 846 | 846 | ||
| 847 | void bh_handler(void* Context) | 847 | static void bh_handler(void* Context) |
| 848 | { | 848 | { |
| 849 | MGSLPC_INFO *info = (MGSLPC_INFO*)Context; | 849 | MGSLPC_INFO *info = (MGSLPC_INFO*)Context; |
| 850 | int action; | 850 | int action; |
| @@ -888,7 +888,7 @@ void bh_handler(void* Context) | |||
| 888 | __FILE__,__LINE__,info->device_name); | 888 | __FILE__,__LINE__,info->device_name); |
| 889 | } | 889 | } |
| 890 | 890 | ||
| 891 | void bh_transmit(MGSLPC_INFO *info) | 891 | static void bh_transmit(MGSLPC_INFO *info) |
| 892 | { | 892 | { |
| 893 | struct tty_struct *tty = info->tty; | 893 | struct tty_struct *tty = info->tty; |
| 894 | if (debug_level >= DEBUG_LEVEL_BH) | 894 | if (debug_level >= DEBUG_LEVEL_BH) |
| @@ -900,7 +900,7 @@ void bh_transmit(MGSLPC_INFO *info) | |||
| 900 | } | 900 | } |
| 901 | } | 901 | } |
| 902 | 902 | ||
| 903 | void bh_status(MGSLPC_INFO *info) | 903 | static void bh_status(MGSLPC_INFO *info) |
| 904 | { | 904 | { |
| 905 | info->ri_chkcount = 0; | 905 | info->ri_chkcount = 0; |
| 906 | info->dsr_chkcount = 0; | 906 | info->dsr_chkcount = 0; |
| @@ -2305,7 +2305,7 @@ static int mgslpc_ioctl(struct tty_struct *tty, struct file * file, | |||
| 2305 | return ioctl_common(info, cmd, arg); | 2305 | return ioctl_common(info, cmd, arg); |
| 2306 | } | 2306 | } |
| 2307 | 2307 | ||
| 2308 | int ioctl_common(MGSLPC_INFO *info, unsigned int cmd, unsigned long arg) | 2308 | static int ioctl_common(MGSLPC_INFO *info, unsigned int cmd, unsigned long arg) |
| 2309 | { | 2309 | { |
| 2310 | int error; | 2310 | int error; |
| 2311 | struct mgsl_icount cnow; /* kernel counter temps */ | 2311 | struct mgsl_icount cnow; /* kernel counter temps */ |
| @@ -2877,7 +2877,7 @@ done: | |||
| 2877 | return ((count < begin+len-off) ? count : begin+len-off); | 2877 | return ((count < begin+len-off) ? count : begin+len-off); |
| 2878 | } | 2878 | } |
| 2879 | 2879 | ||
| 2880 | int rx_alloc_buffers(MGSLPC_INFO *info) | 2880 | static int rx_alloc_buffers(MGSLPC_INFO *info) |
| 2881 | { | 2881 | { |
| 2882 | /* each buffer has header and data */ | 2882 | /* each buffer has header and data */ |
| 2883 | info->rx_buf_size = sizeof(RXBUF) + info->max_frame_size; | 2883 | info->rx_buf_size = sizeof(RXBUF) + info->max_frame_size; |
| @@ -2900,13 +2900,13 @@ int rx_alloc_buffers(MGSLPC_INFO *info) | |||
| 2900 | return 0; | 2900 | return 0; |
| 2901 | } | 2901 | } |
| 2902 | 2902 | ||
| 2903 | void rx_free_buffers(MGSLPC_INFO *info) | 2903 | static void rx_free_buffers(MGSLPC_INFO *info) |
| 2904 | { | 2904 | { |
| 2905 | kfree(info->rx_buf); | 2905 | kfree(info->rx_buf); |
| 2906 | info->rx_buf = NULL; | 2906 | info->rx_buf = NULL; |
| 2907 | } | 2907 | } |
| 2908 | 2908 | ||
| 2909 | int claim_resources(MGSLPC_INFO *info) | 2909 | static int claim_resources(MGSLPC_INFO *info) |
| 2910 | { | 2910 | { |
| 2911 | if (rx_alloc_buffers(info) < 0 ) { | 2911 | if (rx_alloc_buffers(info) < 0 ) { |
| 2912 | printk( "Cant allocate rx buffer %s\n", info->device_name); | 2912 | printk( "Cant allocate rx buffer %s\n", info->device_name); |
| @@ -2916,7 +2916,7 @@ int claim_resources(MGSLPC_INFO *info) | |||
| 2916 | return 0; | 2916 | return 0; |
| 2917 | } | 2917 | } |
| 2918 | 2918 | ||
| 2919 | void release_resources(MGSLPC_INFO *info) | 2919 | static void release_resources(MGSLPC_INFO *info) |
| 2920 | { | 2920 | { |
| 2921 | if (debug_level >= DEBUG_LEVEL_INFO) | 2921 | if (debug_level >= DEBUG_LEVEL_INFO) |
| 2922 | printk("release_resources(%s)\n", info->device_name); | 2922 | printk("release_resources(%s)\n", info->device_name); |
| @@ -2928,7 +2928,7 @@ void release_resources(MGSLPC_INFO *info) | |||
| 2928 | * | 2928 | * |
| 2929 | * Arguments: info pointer to device instance data | 2929 | * Arguments: info pointer to device instance data |
| 2930 | */ | 2930 | */ |
| 2931 | void mgslpc_add_device(MGSLPC_INFO *info) | 2931 | static void mgslpc_add_device(MGSLPC_INFO *info) |
| 2932 | { | 2932 | { |
| 2933 | info->next_device = NULL; | 2933 | info->next_device = NULL; |
| 2934 | info->line = mgslpc_device_count; | 2934 | info->line = mgslpc_device_count; |
| @@ -2964,7 +2964,7 @@ void mgslpc_add_device(MGSLPC_INFO *info) | |||
| 2964 | #endif | 2964 | #endif |
| 2965 | } | 2965 | } |
| 2966 | 2966 | ||
| 2967 | void mgslpc_remove_device(MGSLPC_INFO *remove_info) | 2967 | static void mgslpc_remove_device(MGSLPC_INFO *remove_info) |
| 2968 | { | 2968 | { |
| 2969 | MGSLPC_INFO *info = mgslpc_device_list; | 2969 | MGSLPC_INFO *info = mgslpc_device_list; |
| 2970 | MGSLPC_INFO *last = NULL; | 2970 | MGSLPC_INFO *last = NULL; |
| @@ -3257,7 +3257,7 @@ static void loopback_enable(MGSLPC_INFO *info) | |||
| 3257 | write_reg(info, CHA + MODE, val); | 3257 | write_reg(info, CHA + MODE, val); |
| 3258 | } | 3258 | } |
| 3259 | 3259 | ||
| 3260 | void hdlc_mode(MGSLPC_INFO *info) | 3260 | static void hdlc_mode(MGSLPC_INFO *info) |
| 3261 | { | 3261 | { |
| 3262 | unsigned char val; | 3262 | unsigned char val; |
| 3263 | unsigned char clkmode, clksubmode; | 3263 | unsigned char clkmode, clksubmode; |
| @@ -3497,7 +3497,7 @@ void hdlc_mode(MGSLPC_INFO *info) | |||
| 3497 | rx_stop(info); | 3497 | rx_stop(info); |
| 3498 | } | 3498 | } |
| 3499 | 3499 | ||
| 3500 | void rx_stop(MGSLPC_INFO *info) | 3500 | static void rx_stop(MGSLPC_INFO *info) |
| 3501 | { | 3501 | { |
| 3502 | if (debug_level >= DEBUG_LEVEL_ISR) | 3502 | if (debug_level >= DEBUG_LEVEL_ISR) |
| 3503 | printk("%s(%d):rx_stop(%s)\n", | 3503 | printk("%s(%d):rx_stop(%s)\n", |
| @@ -3510,7 +3510,7 @@ void rx_stop(MGSLPC_INFO *info) | |||
| 3510 | info->rx_overflow = 0; | 3510 | info->rx_overflow = 0; |
| 3511 | } | 3511 | } |
| 3512 | 3512 | ||
| 3513 | void rx_start(MGSLPC_INFO *info) | 3513 | static void rx_start(MGSLPC_INFO *info) |
| 3514 | { | 3514 | { |
| 3515 | if (debug_level >= DEBUG_LEVEL_ISR) | 3515 | if (debug_level >= DEBUG_LEVEL_ISR) |
| 3516 | printk("%s(%d):rx_start(%s)\n", | 3516 | printk("%s(%d):rx_start(%s)\n", |
| @@ -3526,7 +3526,7 @@ void rx_start(MGSLPC_INFO *info) | |||
| 3526 | info->rx_enabled = 1; | 3526 | info->rx_enabled = 1; |
| 3527 | } | 3527 | } |
| 3528 | 3528 | ||
| 3529 | void tx_start(MGSLPC_INFO *info) | 3529 | static void tx_start(MGSLPC_INFO *info) |
| 3530 | { | 3530 | { |
| 3531 | if (debug_level >= DEBUG_LEVEL_ISR) | 3531 | if (debug_level >= DEBUG_LEVEL_ISR) |
| 3532 | printk("%s(%d):tx_start(%s)\n", | 3532 | printk("%s(%d):tx_start(%s)\n", |
| @@ -3564,7 +3564,7 @@ void tx_start(MGSLPC_INFO *info) | |||
| 3564 | info->tx_enabled = 1; | 3564 | info->tx_enabled = 1; |
| 3565 | } | 3565 | } |
| 3566 | 3566 | ||
| 3567 | void tx_stop(MGSLPC_INFO *info) | 3567 | static void tx_stop(MGSLPC_INFO *info) |
| 3568 | { | 3568 | { |
| 3569 | if (debug_level >= DEBUG_LEVEL_ISR) | 3569 | if (debug_level >= DEBUG_LEVEL_ISR) |
| 3570 | printk("%s(%d):tx_stop(%s)\n", | 3570 | printk("%s(%d):tx_stop(%s)\n", |
| @@ -3578,7 +3578,7 @@ void tx_stop(MGSLPC_INFO *info) | |||
| 3578 | 3578 | ||
| 3579 | /* Reset the adapter to a known state and prepare it for further use. | 3579 | /* Reset the adapter to a known state and prepare it for further use. |
| 3580 | */ | 3580 | */ |
| 3581 | void reset_device(MGSLPC_INFO *info) | 3581 | static void reset_device(MGSLPC_INFO *info) |
| 3582 | { | 3582 | { |
| 3583 | /* power up both channels (set BIT7) */ | 3583 | /* power up both channels (set BIT7) */ |
| 3584 | write_reg(info, CHA + CCR0, 0x80); | 3584 | write_reg(info, CHA + CCR0, 0x80); |
| @@ -3628,7 +3628,7 @@ void reset_device(MGSLPC_INFO *info) | |||
| 3628 | write_reg(info, IPC, 0x05); | 3628 | write_reg(info, IPC, 0x05); |
| 3629 | } | 3629 | } |
| 3630 | 3630 | ||
| 3631 | void async_mode(MGSLPC_INFO *info) | 3631 | static void async_mode(MGSLPC_INFO *info) |
| 3632 | { | 3632 | { |
| 3633 | unsigned char val; | 3633 | unsigned char val; |
| 3634 | 3634 | ||
| @@ -3799,7 +3799,7 @@ void async_mode(MGSLPC_INFO *info) | |||
| 3799 | 3799 | ||
| 3800 | /* Set the HDLC idle mode for the transmitter. | 3800 | /* Set the HDLC idle mode for the transmitter. |
| 3801 | */ | 3801 | */ |
| 3802 | void tx_set_idle(MGSLPC_INFO *info) | 3802 | static void tx_set_idle(MGSLPC_INFO *info) |
| 3803 | { | 3803 | { |
| 3804 | /* Note: ESCC2 only supports flags and one idle modes */ | 3804 | /* Note: ESCC2 only supports flags and one idle modes */ |
| 3805 | if (info->idle_mode == HDLC_TXIDLE_FLAGS) | 3805 | if (info->idle_mode == HDLC_TXIDLE_FLAGS) |
| @@ -3810,7 +3810,7 @@ void tx_set_idle(MGSLPC_INFO *info) | |||
| 3810 | 3810 | ||
| 3811 | /* get state of the V24 status (input) signals. | 3811 | /* get state of the V24 status (input) signals. |
| 3812 | */ | 3812 | */ |
| 3813 | void get_signals(MGSLPC_INFO *info) | 3813 | static void get_signals(MGSLPC_INFO *info) |
| 3814 | { | 3814 | { |
| 3815 | unsigned char status = 0; | 3815 | unsigned char status = 0; |
| 3816 | 3816 | ||
| @@ -3832,7 +3832,7 @@ void get_signals(MGSLPC_INFO *info) | |||
| 3832 | /* Set the state of DTR and RTS based on contents of | 3832 | /* Set the state of DTR and RTS based on contents of |
| 3833 | * serial_signals member of device extension. | 3833 | * serial_signals member of device extension. |
| 3834 | */ | 3834 | */ |
| 3835 | void set_signals(MGSLPC_INFO *info) | 3835 | static void set_signals(MGSLPC_INFO *info) |
| 3836 | { | 3836 | { |
| 3837 | unsigned char val; | 3837 | unsigned char val; |
| 3838 | 3838 | ||
| @@ -3856,7 +3856,7 @@ void set_signals(MGSLPC_INFO *info) | |||
| 3856 | set_reg_bits(info, CHA + PVR, PVR_DTR); | 3856 | set_reg_bits(info, CHA + PVR, PVR_DTR); |
| 3857 | } | 3857 | } |
| 3858 | 3858 | ||
| 3859 | void rx_reset_buffers(MGSLPC_INFO *info) | 3859 | static void rx_reset_buffers(MGSLPC_INFO *info) |
| 3860 | { | 3860 | { |
| 3861 | RXBUF *buf; | 3861 | RXBUF *buf; |
| 3862 | int i; | 3862 | int i; |
| @@ -3875,7 +3875,7 @@ void rx_reset_buffers(MGSLPC_INFO *info) | |||
| 3875 | * | 3875 | * |
| 3876 | * Returns 1 if frame returned, otherwise 0 | 3876 | * Returns 1 if frame returned, otherwise 0 |
| 3877 | */ | 3877 | */ |
| 3878 | int rx_get_frame(MGSLPC_INFO *info) | 3878 | static int rx_get_frame(MGSLPC_INFO *info) |
| 3879 | { | 3879 | { |
| 3880 | unsigned short status; | 3880 | unsigned short status; |
| 3881 | RXBUF *buf; | 3881 | RXBUF *buf; |
| @@ -3961,7 +3961,7 @@ int rx_get_frame(MGSLPC_INFO *info) | |||
| 3961 | return 1; | 3961 | return 1; |
| 3962 | } | 3962 | } |
| 3963 | 3963 | ||
| 3964 | BOOLEAN register_test(MGSLPC_INFO *info) | 3964 | static BOOLEAN register_test(MGSLPC_INFO *info) |
| 3965 | { | 3965 | { |
| 3966 | static unsigned char patterns[] = | 3966 | static unsigned char patterns[] = |
| 3967 | { 0x00, 0xff, 0xaa, 0x55, 0x69, 0x96, 0x0f }; | 3967 | { 0x00, 0xff, 0xaa, 0x55, 0x69, 0x96, 0x0f }; |
| @@ -3987,7 +3987,7 @@ BOOLEAN register_test(MGSLPC_INFO *info) | |||
| 3987 | return rc; | 3987 | return rc; |
| 3988 | } | 3988 | } |
| 3989 | 3989 | ||
| 3990 | BOOLEAN irq_test(MGSLPC_INFO *info) | 3990 | static BOOLEAN irq_test(MGSLPC_INFO *info) |
| 3991 | { | 3991 | { |
| 3992 | unsigned long end_time; | 3992 | unsigned long end_time; |
| 3993 | unsigned long flags; | 3993 | unsigned long flags; |
| @@ -4022,7 +4022,7 @@ BOOLEAN irq_test(MGSLPC_INFO *info) | |||
| 4022 | return info->irq_occurred ? TRUE : FALSE; | 4022 | return info->irq_occurred ? TRUE : FALSE; |
| 4023 | } | 4023 | } |
| 4024 | 4024 | ||
| 4025 | int adapter_test(MGSLPC_INFO *info) | 4025 | static int adapter_test(MGSLPC_INFO *info) |
| 4026 | { | 4026 | { |
| 4027 | if (!register_test(info)) { | 4027 | if (!register_test(info)) { |
| 4028 | info->init_error = DiagStatus_AddressFailure; | 4028 | info->init_error = DiagStatus_AddressFailure; |
| @@ -4044,7 +4044,7 @@ int adapter_test(MGSLPC_INFO *info) | |||
| 4044 | return 0; | 4044 | return 0; |
| 4045 | } | 4045 | } |
| 4046 | 4046 | ||
| 4047 | void trace_block(MGSLPC_INFO *info,const char* data, int count, int xmit) | 4047 | static void trace_block(MGSLPC_INFO *info,const char* data, int count, int xmit) |
| 4048 | { | 4048 | { |
| 4049 | int i; | 4049 | int i; |
| 4050 | int linecount; | 4050 | int linecount; |
| @@ -4079,7 +4079,7 @@ void trace_block(MGSLPC_INFO *info,const char* data, int count, int xmit) | |||
| 4079 | /* HDLC frame time out | 4079 | /* HDLC frame time out |
| 4080 | * update stats and do tx completion processing | 4080 | * update stats and do tx completion processing |
| 4081 | */ | 4081 | */ |
| 4082 | void tx_timeout(unsigned long context) | 4082 | static void tx_timeout(unsigned long context) |
| 4083 | { | 4083 | { |
| 4084 | MGSLPC_INFO *info = (MGSLPC_INFO*)context; | 4084 | MGSLPC_INFO *info = (MGSLPC_INFO*)context; |
| 4085 | unsigned long flags; | 4085 | unsigned long flags; |
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 7cac6d05d723..f6686fcce809 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
| @@ -960,10 +960,6 @@ found: | |||
| 960 | * PCI Slot 2 INTA# (and some INTx# in Slot 1). | 960 | * PCI Slot 2 INTA# (and some INTx# in Slot 1). |
| 961 | */ | 961 | */ |
| 962 | if (request_irq(rtc_irq, rtc_interrupt, SA_SHIRQ, "rtc", (void *)&rtc_port)) { | 962 | if (request_irq(rtc_irq, rtc_interrupt, SA_SHIRQ, "rtc", (void *)&rtc_port)) { |
| 963 | /* | ||
| 964 | * Standard way for sparc to print irq's is to use | ||
| 965 | * __irq_itoa(). I think for EBus it's ok to use %d. | ||
| 966 | */ | ||
| 967 | printk(KERN_ERR "rtc: cannot register IRQ %d\n", rtc_irq); | 963 | printk(KERN_ERR "rtc: cannot register IRQ %d\n", rtc_irq); |
| 968 | return -EIO; | 964 | return -EIO; |
| 969 | } | 965 | } |
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index a90f5d97df35..43dfd8689dce 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
| @@ -512,7 +512,7 @@ static struct sonypi_device { | |||
| 512 | 512 | ||
| 513 | #ifdef CONFIG_ACPI | 513 | #ifdef CONFIG_ACPI |
| 514 | static struct acpi_device *sonypi_acpi_device; | 514 | static struct acpi_device *sonypi_acpi_device; |
| 515 | static int acpi_enabled; | 515 | static int acpi_driver_registered; |
| 516 | #endif | 516 | #endif |
| 517 | 517 | ||
| 518 | static int sonypi_ec_write(u8 addr, u8 value) | 518 | static int sonypi_ec_write(u8 addr, u8 value) |
| @@ -869,7 +869,7 @@ found: | |||
| 869 | sonypi_report_input_event(event); | 869 | sonypi_report_input_event(event); |
| 870 | 870 | ||
| 871 | #ifdef CONFIG_ACPI | 871 | #ifdef CONFIG_ACPI |
| 872 | if (acpi_enabled) | 872 | if (sonypi_acpi_device) |
| 873 | acpi_bus_generate_event(sonypi_acpi_device, 1, event); | 873 | acpi_bus_generate_event(sonypi_acpi_device, 1, event); |
| 874 | #endif | 874 | #endif |
| 875 | 875 | ||
| @@ -1551,8 +1551,8 @@ static int __init sonypi_init(void) | |||
| 1551 | goto err_free_device; | 1551 | goto err_free_device; |
| 1552 | 1552 | ||
| 1553 | #ifdef CONFIG_ACPI | 1553 | #ifdef CONFIG_ACPI |
| 1554 | if (acpi_bus_register_driver(&sonypi_acpi_driver) > 0) | 1554 | if (acpi_bus_register_driver(&sonypi_acpi_driver) >= 0) |
| 1555 | acpi_enabled = 1; | 1555 | acpi_driver_registered = 1; |
| 1556 | #endif | 1556 | #endif |
| 1557 | 1557 | ||
| 1558 | return 0; | 1558 | return 0; |
| @@ -1567,7 +1567,7 @@ static int __init sonypi_init(void) | |||
| 1567 | static void __exit sonypi_exit(void) | 1567 | static void __exit sonypi_exit(void) |
| 1568 | { | 1568 | { |
| 1569 | #ifdef CONFIG_ACPI | 1569 | #ifdef CONFIG_ACPI |
| 1570 | if (acpi_enabled) | 1570 | if (acpi_driver_registered) |
| 1571 | acpi_bus_unregister_driver(&sonypi_acpi_driver); | 1571 | acpi_bus_unregister_driver(&sonypi_acpi_driver); |
| 1572 | #endif | 1572 | #endif |
| 1573 | platform_device_unregister(sonypi_platform_device); | 1573 | platform_device_unregister(sonypi_platform_device); |
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index a88b94a82b14..8b2a59969868 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
| @@ -2961,12 +2961,14 @@ static struct class *tty_class; | |||
| 2961 | * This field is optional, if there is no known struct device for this | 2961 | * This field is optional, if there is no known struct device for this |
| 2962 | * tty device it can be set to NULL safely. | 2962 | * tty device it can be set to NULL safely. |
| 2963 | * | 2963 | * |
| 2964 | * Returns a pointer to the class device (or ERR_PTR(-EFOO) on error). | ||
| 2965 | * | ||
| 2964 | * This call is required to be made to register an individual tty device if | 2966 | * This call is required to be made to register an individual tty device if |
| 2965 | * the tty driver's flags have the TTY_DRIVER_NO_DEVFS bit set. If that | 2967 | * the tty driver's flags have the TTY_DRIVER_NO_DEVFS bit set. If that |
| 2966 | * bit is not set, this function should not be called. | 2968 | * bit is not set, this function should not be called. |
| 2967 | */ | 2969 | */ |
| 2968 | void tty_register_device(struct tty_driver *driver, unsigned index, | 2970 | struct class_device *tty_register_device(struct tty_driver *driver, |
| 2969 | struct device *device) | 2971 | unsigned index, struct device *device) |
| 2970 | { | 2972 | { |
| 2971 | char name[64]; | 2973 | char name[64]; |
| 2972 | dev_t dev = MKDEV(driver->major, driver->minor_start) + index; | 2974 | dev_t dev = MKDEV(driver->major, driver->minor_start) + index; |
| @@ -2974,7 +2976,7 @@ void tty_register_device(struct tty_driver *driver, unsigned index, | |||
| 2974 | if (index >= driver->num) { | 2976 | if (index >= driver->num) { |
| 2975 | printk(KERN_ERR "Attempt to register invalid tty line number " | 2977 | printk(KERN_ERR "Attempt to register invalid tty line number " |
| 2976 | " (%d).\n", index); | 2978 | " (%d).\n", index); |
| 2977 | return; | 2979 | return ERR_PTR(-EINVAL); |
| 2978 | } | 2980 | } |
| 2979 | 2981 | ||
| 2980 | devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, | 2982 | devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, |
| @@ -2984,7 +2986,8 @@ void tty_register_device(struct tty_driver *driver, unsigned index, | |||
| 2984 | pty_line_name(driver, index, name); | 2986 | pty_line_name(driver, index, name); |
| 2985 | else | 2987 | else |
| 2986 | tty_line_name(driver, index, name); | 2988 | tty_line_name(driver, index, name); |
| 2987 | class_device_create(tty_class, NULL, dev, device, "%s", name); | 2989 | |
| 2990 | return class_device_create(tty_class, NULL, dev, device, "%s", name); | ||
| 2988 | } | 2991 | } |
| 2989 | 2992 | ||
| 2990 | /** | 2993 | /** |
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 60aabdb4a046..11c7e9de5958 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c | |||
| @@ -989,7 +989,7 @@ static int viotape_remove(struct vio_dev *vdev) | |||
| 989 | * support. | 989 | * support. |
| 990 | */ | 990 | */ |
| 991 | static struct vio_device_id viotape_device_table[] __devinitdata = { | 991 | static struct vio_device_id viotape_device_table[] __devinitdata = { |
| 992 | { "viotape", "" }, | 992 | { "byte", "IBM,iSeries-viotape" }, |
| 993 | { "", "" } | 993 | { "", "" } |
| 994 | }; | 994 | }; |
| 995 | MODULE_DEVICE_TABLE(vio, viotape_device_table); | 995 | MODULE_DEVICE_TABLE(vio, viotape_device_table); |
