aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 15:09:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 15:09:59 -0400
commit3aebd34b1200a902a8662da8845824a02f00772e (patch)
tree13eac224dc1ac40be53bccc90f27bebf2e619c26 /drivers/char
parent2c0c86d5b67ee04e8b71a2ea2a3af6d224611cfc (diff)
parent5dc2db05f2f690d71d95979b14cca50ab8e49f40 (diff)
Merge tag 'char-misc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver merge from Greg Kroah-Hartman: "Here is the "big" char/misc driver tree update for the 3.7-rc1 merge window. Nothing major, just a number of driver updates and fixes, all of which have been in the linux-next releases for a while now either in my tree, or in Andrew's (the lis3l driver changes came from his tree last week). Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'char-misc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (52 commits) drivers/misc/lis3lv02d/lis3lv02d_i2c.c: add lis3lv02d device tree init drivers/misc/lis3lv02d/lis3lv02d_spi.c: add lis3lv02d device tree init drivers/misc/lis3lv02d: remove lis3lv02d driver DT init drivers/misc/lis3lv02d/lis3lv02d_spi.c: add DT matching table passthru code drivers/misc/lis3lv02d: add generic DT matching code lis3lv02d: fix some comments specific to lis331dlh driver MISC: hpilo, remove pci_disable_device pcmcia: synclink_cs: fix potential tty NULL dereference drivers/char/mmtimer.c: Remove useless kfree drivers/char: removes unnecessary semicolon char/misc: remove CONFIG_EXPERIMENTAL dependencies mei: don't print buffer as a string mei: struct mei_message_data doesn't have to be packed mei: add error messages for open count errors misc: use module_spi_driver tifm: use module_pci_driver misc/at25, dt: Improve at25 SPI eeprom device tree bindings. mei: add lynx point pci device ids mei: fix max number of open handles mei: rename struct pci_dev *mei_device to mei_pdev ...
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/Kconfig6
-rw-r--r--drivers/char/mmtimer.c3
-rw-r--r--drivers/char/nwbutton.c4
-rw-r--r--drivers/char/pcmcia/synclink_cs.c20
-rw-r--r--drivers/char/ppdev.c3
-rw-r--r--drivers/char/rtc.c2
-rw-r--r--drivers/char/tlclk.c4
-rw-r--r--drivers/char/virtio_console.c12
8 files changed, 36 insertions, 18 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index ea6f6325f9b..72bedad6bf8 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -418,8 +418,8 @@ config APPLICOM
418 If unsure, say N. 418 If unsure, say N.
419 419
420config SONYPI 420config SONYPI
421 tristate "Sony Vaio Programmable I/O Control Device support (EXPERIMENTAL)" 421 tristate "Sony Vaio Programmable I/O Control Device support"
422 depends on EXPERIMENTAL && X86 && PCI && INPUT && !64BIT 422 depends on X86 && PCI && INPUT && !64BIT
423 ---help--- 423 ---help---
424 This driver enables access to the Sony Programmable I/O Control 424 This driver enables access to the Sony Programmable I/O Control
425 Device which can be found in many (all ?) Sony Vaio laptops. 425 Device which can be found in many (all ?) Sony Vaio laptops.
@@ -566,7 +566,7 @@ source "drivers/char/tpm/Kconfig"
566 566
567config TELCLOCK 567config TELCLOCK
568 tristate "Telecom clock driver for ATCA SBC" 568 tristate "Telecom clock driver for ATCA SBC"
569 depends on EXPERIMENTAL && X86 569 depends on X86
570 default n 570 default n
571 help 571 help
572 The telecom clock device is specific to the MPCBL0010 and MPCBL0050 572 The telecom clock device is specific to the MPCBL0010 and MPCBL0050
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c
index 33dc2298af7..3d6c0671e99 100644
--- a/drivers/char/mmtimer.c
+++ b/drivers/char/mmtimer.c
@@ -826,7 +826,7 @@ static int __init mmtimer_init(void)
826 826
827 /* Allocate list of node ptrs to mmtimer_t's */ 827 /* Allocate list of node ptrs to mmtimer_t's */
828 timers = kzalloc(sizeof(struct mmtimer_node)*maxn, GFP_KERNEL); 828 timers = kzalloc(sizeof(struct mmtimer_node)*maxn, GFP_KERNEL);
829 if (timers == NULL) { 829 if (!timers) {
830 printk(KERN_ERR "%s: failed to allocate memory for device\n", 830 printk(KERN_ERR "%s: failed to allocate memory for device\n",
831 MMTIMER_NAME); 831 MMTIMER_NAME);
832 goto out3; 832 goto out3;
@@ -848,7 +848,6 @@ static int __init mmtimer_init(void)
848 return 0; 848 return 0;
849 849
850out3: 850out3:
851 kfree(timers);
852 misc_deregister(&mmtimer_miscdev); 851 misc_deregister(&mmtimer_miscdev);
853out2: 852out2:
854 free_irq(SGI_MMTIMER_VECTOR, NULL); 853 free_irq(SGI_MMTIMER_VECTOR, NULL);
diff --git a/drivers/char/nwbutton.c b/drivers/char/nwbutton.c
index 04a480f86c6..cfdfe493c6a 100644
--- a/drivers/char/nwbutton.c
+++ b/drivers/char/nwbutton.c
@@ -93,9 +93,9 @@ int button_del_callback (void (*callback) (void))
93 button_callback_list [lp].count = 0; 93 button_callback_list [lp].count = 0;
94 callback_count--; 94 callback_count--;
95 return 0; 95 return 0;
96 }; 96 }
97 lp--; 97 lp--;
98 }; 98 }
99 return -EINVAL; 99 return -EINVAL;
100} 100}
101 101
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 0a484b4a1b0..a6b8ddea222 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -891,6 +891,14 @@ static void rx_ready_async(MGSLPC_INFO *info, int tcd, struct tty_struct *tty)
891 int work = 0; 891 int work = 0;
892 struct mgsl_icount *icount = &info->icount; 892 struct mgsl_icount *icount = &info->icount;
893 893
894 if (!tty) {
895 /* tty is not available anymore */
896 issue_command(info, CHA, CMD_RXRESET);
897 if (debug_level >= DEBUG_LEVEL_ISR)
898 printk("%s(%d):rx_ready_async(tty=NULL)\n",__FILE__,__LINE__);
899 return;
900 }
901
894 if (tcd) { 902 if (tcd) {
895 /* early termination, get FIFO count from RBCL register */ 903 /* early termination, get FIFO count from RBCL register */
896 fifo_count = (unsigned char)(read_reg(info, CHA+RBCL) & 0x1f); 904 fifo_count = (unsigned char)(read_reg(info, CHA+RBCL) & 0x1f);
@@ -980,7 +988,7 @@ static void tx_done(MGSLPC_INFO *info, struct tty_struct *tty)
980 else 988 else
981#endif 989#endif
982 { 990 {
983 if (tty->stopped || tty->hw_stopped) { 991 if (tty && (tty->stopped || tty->hw_stopped)) {
984 tx_stop(info); 992 tx_stop(info);
985 return; 993 return;
986 } 994 }
@@ -1000,7 +1008,7 @@ static void tx_ready(MGSLPC_INFO *info, struct tty_struct *tty)
1000 if (!info->tx_active) 1008 if (!info->tx_active)
1001 return; 1009 return;
1002 } else { 1010 } else {
1003 if (tty->stopped || tty->hw_stopped) { 1011 if (tty && (tty->stopped || tty->hw_stopped)) {
1004 tx_stop(info); 1012 tx_stop(info);
1005 return; 1013 return;
1006 } 1014 }
@@ -1050,13 +1058,12 @@ static void cts_change(MGSLPC_INFO *info, struct tty_struct *tty)
1050 wake_up_interruptible(&info->status_event_wait_q); 1058 wake_up_interruptible(&info->status_event_wait_q);
1051 wake_up_interruptible(&info->event_wait_q); 1059 wake_up_interruptible(&info->event_wait_q);
1052 1060
1053 if (info->port.flags & ASYNC_CTS_FLOW) { 1061 if (tty && (info->port.flags & ASYNC_CTS_FLOW)) {
1054 if (tty->hw_stopped) { 1062 if (tty->hw_stopped) {
1055 if (info->serial_signals & SerialSignal_CTS) { 1063 if (info->serial_signals & SerialSignal_CTS) {
1056 if (debug_level >= DEBUG_LEVEL_ISR) 1064 if (debug_level >= DEBUG_LEVEL_ISR)
1057 printk("CTS tx start..."); 1065 printk("CTS tx start...");
1058 if (tty) 1066 tty->hw_stopped = 0;
1059 tty->hw_stopped = 0;
1060 tx_start(info, tty); 1067 tx_start(info, tty);
1061 info->pending_bh |= BH_TRANSMIT; 1068 info->pending_bh |= BH_TRANSMIT;
1062 return; 1069 return;
@@ -1065,8 +1072,7 @@ static void cts_change(MGSLPC_INFO *info, struct tty_struct *tty)
1065 if (!(info->serial_signals & SerialSignal_CTS)) { 1072 if (!(info->serial_signals & SerialSignal_CTS)) {
1066 if (debug_level >= DEBUG_LEVEL_ISR) 1073 if (debug_level >= DEBUG_LEVEL_ISR)
1067 printk("CTS tx stop..."); 1074 printk("CTS tx stop...");
1068 if (tty) 1075 tty->hw_stopped = 1;
1069 tty->hw_stopped = 1;
1070 tx_stop(info); 1076 tx_stop(info);
1071 } 1077 }
1072 } 1078 }
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index 3fcf80ff12f..d0d824ebf2c 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -783,7 +783,8 @@ static int __init ppdev_init (void)
783 err = PTR_ERR(ppdev_class); 783 err = PTR_ERR(ppdev_class);
784 goto out_chrdev; 784 goto out_chrdev;
785 } 785 }
786 if (parport_register_driver(&pp_driver)) { 786 err = parport_register_driver(&pp_driver);
787 if (err < 0) {
787 printk (KERN_WARNING CHRDEV ": unable to register with parport\n"); 788 printk (KERN_WARNING CHRDEV ": unable to register with parport\n");
788 goto out_class; 789 goto out_class;
789 } 790 }
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index af9437488b6..91470fdbab2 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -411,7 +411,7 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel)
411 case RTC_IRQP_READ: 411 case RTC_IRQP_READ:
412 case RTC_IRQP_SET: 412 case RTC_IRQP_SET:
413 return -EINVAL; 413 return -EINVAL;
414 }; 414 }
415 } 415 }
416#endif 416#endif
417 417
diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c
index ce29e7cce52..e95e0ab0bd8 100644
--- a/drivers/char/tlclk.c
+++ b/drivers/char/tlclk.c
@@ -784,8 +784,10 @@ static int __init tlclk_init(void)
784 } 784 }
785 tlclk_major = ret; 785 tlclk_major = ret;
786 alarm_events = kzalloc( sizeof(struct tlclk_alarms), GFP_KERNEL); 786 alarm_events = kzalloc( sizeof(struct tlclk_alarms), GFP_KERNEL);
787 if (!alarm_events) 787 if (!alarm_events) {
788 ret = -ENOMEM;
788 goto out1; 789 goto out1;
790 }
789 791
790 /* Read telecom clock IRQ number (Set by BIOS) */ 792 /* Read telecom clock IRQ number (Set by BIOS) */
791 if (!request_region(TLCLK_BASE, 8, "telco_clock")) { 793 if (!request_region(TLCLK_BASE, 8, "telco_clock")) {
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index cdf2f5451c7..060a672ebb7 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1941,7 +1941,17 @@ static int __init init(void)
1941 INIT_LIST_HEAD(&pdrvdata.consoles); 1941 INIT_LIST_HEAD(&pdrvdata.consoles);
1942 INIT_LIST_HEAD(&pdrvdata.portdevs); 1942 INIT_LIST_HEAD(&pdrvdata.portdevs);
1943 1943
1944 return register_virtio_driver(&virtio_console); 1944 err = register_virtio_driver(&virtio_console);
1945 if (err < 0) {
1946 pr_err("Error %d registering virtio driver\n", err);
1947 goto free;
1948 }
1949 return 0;
1950free:
1951 if (pdrvdata.debugfs_dir)
1952 debugfs_remove_recursive(pdrvdata.debugfs_dir);
1953 class_destroy(pdrvdata.class);
1954 return err;
1945} 1955}
1946 1956
1947static void __exit fini(void) 1957static void __exit fini(void)