* Fri Jul 30 2010 Jarod Wilson <jarod@redhat.com>

- lirc staging update
- update kworld patch to one committed upstream
- can't believe how much nicer dist-git is than dist-cvs
This commit is contained in:
Jarod Wilson 2010-07-30 14:58:12 -04:00
parent e4578eae2c
commit 89a6e0800f
3 changed files with 115 additions and 90 deletions

View File

@ -1864,6 +1864,11 @@ fi
# || || # || ||
%changelog %changelog
* Fri Jul 30 2010 Jarod Wilson <jarod@redhat.com>
- lirc staging update
- update kworld patch to one committed upstream
- can't believe how much nicer dist-git is than dist-cvs
* Fri Jul 30 2010 Dave Jones <davej@redhat.com> * Fri Jul 30 2010 Dave Jones <davej@redhat.com>
- Enable PPS (#619392) - Enable PPS (#619392)

View File

@ -1,28 +1,35 @@
From c34c78838f02693a70808e38309629e85aa50266 Mon Sep 17 00:00:00 2001 commit 611225f5e7f9d11c4b119fac224f1bd6903b0150
From: Jarod Wilson <jarod@redhat.com> Author: Jarod Wilson <jarod@redhat.com>
Date: Thu, 20 May 2010 10:03:13 -0400 Date: Sun Mar 7 17:55:43 2010 -0300
Subject: [PATCH] dvb: add support for kworld 340u and ub435-q to em28xx-dvb
This adds support for the KWorld PlusTV 340U and KWorld UB345-Q ATSC V4L/DVB: dvb: add support for kworld 340u and ub435-q to em28xx-dvb
sticks, which are really the same device. The sticks have an eMPIA
em2870 usb bridge chipset, an LG Electronics LGDT3304 ATSC/QAM
demodulator and an NXP TDA18271HD tuner -- early versions of the 340U
have a a TDA18271HD/C1, later models and the UB435-Q have a C2.
The stick has been tested succesfully with both VSB_8 and QAM_256 signals. This adds support for the KWorld PlusTV 340U and KWorld UB345-Q ATSC
Its using lgdt3304 support added to the lgdt3305 driver by a prior patch, sticks, which are really the same device. The sticks have an eMPIA
rather than the current lgdt3304 driver, as its severely lacking in em2870 usb bridge chipset, an LG Electronics LGDT3304 ATSC/QAM
functionality by comparison (see said patch for details). demodulator and an NXP TDA18271HD tuner -- early versions of the 340U
have a a TDA18271HD/C1, later models and the UB435-Q have a C2.
Signed-off-by: Jarod Wilson <jarod@redhat.com> The stick has been tested succesfully with both VSB_8 and QAM_256 signals.
--- Its using lgdt3304 support added to the lgdt3305 driver by a prior patch,
drivers/media/video/em28xx/em28xx-cards.c | 28 ++++++++++++++++++++++++ rather than the current lgdt3304 driver, as its severely lacking in
drivers/media/video/em28xx/em28xx-dvb.c | 33 +++++++++++++++++++++++++++++ functionality by comparison (see said patch for details).
drivers/media/video/em28xx/em28xx.h | 1 +
3 files changed, 62 insertions(+), 0 deletions(-)
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index 3a623aa..5c56875 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -72,3 +72,4 @@
73 -> Reddo DVB-C USB TV Box (em2870)
74 -> Actionmaster/LinXcel/Digitus VC211A (em2800)
75 -> Dikom DK300 (em2882)
+ 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340]
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index b0fb083..6312e76 100644 index 3a4fd85..ffbe544 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c --- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -158,6 +158,22 @@ static struct em28xx_reg_seq evga_indtube_digital[] = { @@ -158,6 +158,22 @@ static struct em28xx_reg_seq evga_indtube_digital[] = {
@ -48,7 +55,7 @@ index b0fb083..6312e76 100644
/* Pinnacle Hybrid Pro eb1a:2881 */ /* Pinnacle Hybrid Pro eb1a:2881 */
static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = { static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = {
{EM28XX_R08_GPIO, 0xfd, ~EM_GPIO_4, 10}, {EM28XX_R08_GPIO, 0xfd, ~EM_GPIO_4, 10},
@@ -1649,6 +1665,16 @@ struct em28xx_board em28xx_boards[] = { @@ -1667,6 +1683,16 @@ struct em28xx_board em28xx_boards[] = {
.tuner_gpio = reddo_dvb_c_usb_box, .tuner_gpio = reddo_dvb_c_usb_box,
.has_dvb = 1, .has_dvb = 1,
}, },
@ -65,7 +72,7 @@ index b0fb083..6312e76 100644
}; };
const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);
@@ -1768,6 +1794,8 @@ struct usb_device_id em28xx_id_table[] = { @@ -1788,6 +1814,8 @@ struct usb_device_id em28xx_id_table[] = {
.driver_info = EM2820_BOARD_IODATA_GVMVP_SZ }, .driver_info = EM2820_BOARD_IODATA_GVMVP_SZ },
{ USB_DEVICE(0xeb1a, 0x50a6), { USB_DEVICE(0xeb1a, 0x50a6),
.driver_info = EM2860_BOARD_GADMEI_UTV330 }, .driver_info = EM2860_BOARD_GADMEI_UTV330 },
@ -75,7 +82,7 @@ index b0fb083..6312e76 100644
}; };
MODULE_DEVICE_TABLE(usb, em28xx_id_table); MODULE_DEVICE_TABLE(usb, em28xx_id_table);
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index bcd3c37..ce8a9ee 100644 index cf1d8c3..3ac8d30 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c --- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -30,11 +30,13 @@ @@ -30,11 +30,13 @@
@ -129,7 +136,7 @@ index bcd3c37..ce8a9ee 100644
static struct zl10353_config em28xx_zl10353_xc3028_no_i2c_gate = { static struct zl10353_config em28xx_zl10353_xc3028_no_i2c_gate = {
.demod_address = (0x1e >> 1), .demod_address = (0x1e >> 1),
.no_tuner = 1, .no_tuner = 1,
@@ -570,6 +595,14 @@ static int dvb_init(struct em28xx *dev) @@ -572,6 +597,14 @@ static int dvb_init(struct em28xx *dev)
} }
} }
break; break;
@ -145,10 +152,10 @@ index bcd3c37..ce8a9ee 100644
em28xx_errdev("/2: The frontend of your DVB/ATSC card" em28xx_errdev("/2: The frontend of your DVB/ATSC card"
" isn't supported yet\n"); " isn't supported yet\n");
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index ba6fe5d..9f3fdad 100644 index 6216786..1c61a6b 100644
--- a/drivers/media/video/em28xx/em28xx.h --- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h
@@ -112,6 +112,7 @@ @@ -114,6 +114,7 @@
#define EM2870_BOARD_REDDO_DVB_C_USB_BOX 73 #define EM2870_BOARD_REDDO_DVB_C_USB_BOX 73
#define EM2800_BOARD_VC211A 74 #define EM2800_BOARD_VC211A 74
#define EM2882_BOARD_DIKOM_DK300 75 #define EM2882_BOARD_DIKOM_DK300 75
@ -156,6 +163,3 @@ index ba6fe5d..9f3fdad 100644
/* Limits minimum and default number of buffers */ /* Limits minimum and default number of buffers */
#define EM28XX_MIN_BUF 4 #define EM28XX_MIN_BUF 4
--
1.7.0.1

View File

@ -1,15 +1,16 @@
drivers/staging/Kconfig | 2 + drivers/staging/Kconfig | 2 +
drivers/staging/Makefile | 1 + drivers/staging/Makefile | 1 +
drivers/staging/lirc/Kconfig | 110 +++ drivers/staging/lirc/Kconfig | 111 +++
drivers/staging/lirc/Makefile | 19 + drivers/staging/lirc/Makefile | 19 +
drivers/staging/lirc/TODO | 8 + drivers/staging/lirc/TODO | 8 +
drivers/staging/lirc/TODO.lirc_i2c | 3 +
drivers/staging/lirc/lirc_bt829.c | 383 +++++++++ drivers/staging/lirc/lirc_bt829.c | 383 +++++++++
drivers/staging/lirc/lirc_ene0100.c | 646 ++++++++++++++ drivers/staging/lirc/lirc_ene0100.c | 646 ++++++++++++++
drivers/staging/lirc/lirc_ene0100.h | 169 ++++ drivers/staging/lirc/lirc_ene0100.h | 169 ++++
drivers/staging/lirc/lirc_i2c.c | 536 ++++++++++++ drivers/staging/lirc/lirc_i2c.c | 536 ++++++++++++
drivers/staging/lirc/lirc_igorplugusb.c | 555 ++++++++++++ drivers/staging/lirc/lirc_igorplugusb.c | 555 ++++++++++++
drivers/staging/lirc/lirc_imon.c | 1058 +++++++++++++++++++++++ drivers/staging/lirc/lirc_imon.c | 1058 +++++++++++++++++++++++
drivers/staging/lirc/lirc_it87.c | 1019 +++++++++++++++++++++++ drivers/staging/lirc/lirc_it87.c | 1022 +++++++++++++++++++++++
drivers/staging/lirc/lirc_it87.h | 116 +++ drivers/staging/lirc/lirc_it87.h | 116 +++
drivers/staging/lirc/lirc_ite8709.c | 542 ++++++++++++ drivers/staging/lirc/lirc_ite8709.c | 542 ++++++++++++
drivers/staging/lirc/lirc_parallel.c | 705 ++++++++++++++++ drivers/staging/lirc/lirc_parallel.c | 705 ++++++++++++++++
@ -18,9 +19,9 @@
drivers/staging/lirc/lirc_serial.c | 1313 +++++++++++++++++++++++++++++ drivers/staging/lirc/lirc_serial.c | 1313 +++++++++++++++++++++++++++++
drivers/staging/lirc/lirc_sir.c | 1282 ++++++++++++++++++++++++++++ drivers/staging/lirc/lirc_sir.c | 1282 ++++++++++++++++++++++++++++
drivers/staging/lirc/lirc_streamzap.c | 821 ++++++++++++++++++ drivers/staging/lirc/lirc_streamzap.c | 821 ++++++++++++++++++
drivers/staging/lirc/lirc_ttusbir.c | 397 +++++++++ drivers/staging/lirc/lirc_ttusbir.c | 396 +++++++++
drivers/staging/lirc/lirc_zilog.c | 1387 +++++++++++++++++++++++++++++++ drivers/staging/lirc/lirc_zilog.c | 1387 +++++++++++++++++++++++++++++++
22 files changed, 12028 insertions(+), 0 deletions(-) 23 files changed, 12034 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 984a754..9296517 100644 index 984a754..9296517 100644
@ -35,25 +36,29 @@ index 984a754..9296517 100644
endif # !STAGING_EXCLUDE_BUILD endif # !STAGING_EXCLUDE_BUILD
endif # STAGING endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 9fa2513..9e9b068 100644 index 9fa2513..6c5b523 100644
--- a/drivers/staging/Makefile --- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile +++ b/drivers/staging/Makefile
@@ -54,3 +54,4 @@ obj-$(CONFIG_ADIS16255) += adis16255/ @@ -8,6 +8,7 @@ obj-$(CONFIG_SLICOSS) += slicoss/
obj-$(CONFIG_FB_XGI) += xgifb/ obj-$(CONFIG_VIDEO_GO7007) += go7007/
obj-$(CONFIG_TOUCHSCREEN_MRSTOUCH) += mrst-touchscreen/ obj-$(CONFIG_VIDEO_CX25821) += cx25821/
obj-$(CONFIG_MSM_STAGING) += msm/ obj-$(CONFIG_VIDEO_TM6000) += tm6000/
+obj-$(CONFIG_LIRC_STAGING) += lirc/ +obj-$(CONFIG_LIRC_STAGING) += lirc/
obj-$(CONFIG_USB_IP_COMMON) += usbip/
obj-$(CONFIG_W35UND) += winbond/
obj-$(CONFIG_PRISM2_USB) += wlan-ng/
diff --git a/drivers/staging/lirc/Kconfig b/drivers/staging/lirc/Kconfig diff --git a/drivers/staging/lirc/Kconfig b/drivers/staging/lirc/Kconfig
new file mode 100644 new file mode 100644
index 0000000..968c2ad index 0000000..ab30a09
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/Kconfig +++ b/drivers/staging/lirc/Kconfig
@@ -0,0 +1,110 @@ @@ -0,0 +1,111 @@
+# +#
+# LIRC driver(s) configuration +# LIRC driver(s) configuration
+# +#
+menuconfig LIRC_STAGING +menuconfig LIRC_STAGING
+ bool "Linux Infrared Remote Control IR receiver/transmitter drivers" + bool "Linux Infrared Remote Control IR receiver/transmitter drivers"
+ depends on LIRC
+ help + help
+ Say Y here, and all supported Linux Infrared Remote Control IR and + Say Y here, and all supported Linux Infrared Remote Control IR and
+ RF receiver and transmitter drivers will be displayed. When paired + RF receiver and transmitter drivers will be displayed. When paired
@ -64,13 +69,13 @@ index 0000000..968c2ad
+ +
+config LIRC_BT829 +config LIRC_BT829
+ tristate "BT829 based hardware" + tristate "BT829 based hardware"
+ depends on LIRC_STAGING + depends on LIRC_STAGING && PCI
+ help + help
+ Driver for the IR interface on BT829-based hardware + Driver for the IR interface on BT829-based hardware
+ +
+config LIRC_ENE0100 +config LIRC_ENE0100
+ tristate "ENE KB3924/ENE0100 CIR Port Reciever" + tristate "ENE KB3924/ENE0100 CIR Port Reciever"
+ depends on LIRC_STAGING + depends on LIRC_STAGING && PNP
+ help + help
+ This is a driver for CIR port handled by ENE KB3924 embedded + This is a driver for CIR port handled by ENE KB3924 embedded
+ controller found on some notebooks. + controller found on some notebooks.
@ -78,7 +83,7 @@ index 0000000..968c2ad
+ +
+config LIRC_I2C +config LIRC_I2C
+ tristate "I2C Based IR Receivers" + tristate "I2C Based IR Receivers"
+ depends on LIRC_STAGING + depends on LIRC_STAGING && I2C
+ help + help
+ Driver for I2C-based IR receivers, such as those commonly + Driver for I2C-based IR receivers, such as those commonly
+ found onboard Hauppauge PVR-150/250/350 video capture cards + found onboard Hauppauge PVR-150/250/350 video capture cards
@ -91,7 +96,7 @@ index 0000000..968c2ad
+ +
+config LIRC_IMON +config LIRC_IMON
+ tristate "Legacy SoundGraph iMON Receiver and Display" + tristate "Legacy SoundGraph iMON Receiver and Display"
+ depends on LIRC_STAGING + depends on LIRC_STAGING && USB
+ help + help
+ Driver for the original SoundGraph iMON IR Receiver and Display + Driver for the original SoundGraph iMON IR Receiver and Display
+ +
@ -99,7 +104,7 @@ index 0000000..968c2ad
+ +
+config LIRC_IT87 +config LIRC_IT87
+ tristate "ITE IT87XX CIR Port Receiver" + tristate "ITE IT87XX CIR Port Receiver"
+ depends on LIRC_STAGING + depends on LIRC_STAGING && PNP
+ help + help
+ Driver for the ITE IT87xx IR Receiver + Driver for the ITE IT87xx IR Receiver
+ +
@ -111,13 +116,13 @@ index 0000000..968c2ad
+ +
+config LIRC_PARALLEL +config LIRC_PARALLEL
+ tristate "Homebrew Parallel Port Receiver" + tristate "Homebrew Parallel Port Receiver"
+ depends on LIRC_STAGING && !SMP + depends on LIRC_STAGING && PARPORT && !SMP
+ help + help
+ Driver for Homebrew Parallel Port Receivers + Driver for Homebrew Parallel Port Receivers
+ +
+config LIRC_SASEM +config LIRC_SASEM
+ tristate "Sasem USB IR Remote" + tristate "Sasem USB IR Remote"
+ depends on LIRC_STAGING + depends on LIRC_STAGING && USB
+ help + help
+ Driver for the Sasem OnAir Remocon-V or Dign HV5 HTPC IR/VFD Module + Driver for the Sasem OnAir Remocon-V or Dign HV5 HTPC IR/VFD Module
+ +
@ -142,7 +147,7 @@ index 0000000..968c2ad
+ +
+config LIRC_STREAMZAP +config LIRC_STREAMZAP
+ tristate "Streamzap PC Receiver" + tristate "Streamzap PC Receiver"
+ depends on LIRC_STAGING + depends on LIRC_STAGING && USB
+ help + help
+ Driver for the Streamzap PC Receiver + Driver for the Streamzap PC Receiver
+ +
@ -154,7 +159,7 @@ index 0000000..968c2ad
+ +
+config LIRC_ZILOG +config LIRC_ZILOG
+ tristate "Zilog/Hauppauge IR Transmitter" + tristate "Zilog/Hauppauge IR Transmitter"
+ depends on LIRC_STAGING + depends on LIRC_STAGING && I2C
+ help + help
+ Driver for the Zilog/Hauppauge IR Transmitter, found on + Driver for the Zilog/Hauppauge IR Transmitter, found on
+ PVR-150/500, HVR-1200/1250/1700/1800, HD-PVR and other cards + PVR-150/500, HVR-1200/1250/1700/1800, HD-PVR and other cards
@ -198,9 +203,18 @@ index 0000000..b6cb593
+Jarod Wilson <jarod@wilsonet.com> +Jarod Wilson <jarod@wilsonet.com>
+Greg Kroah-Hartman <greg@kroah.com> +Greg Kroah-Hartman <greg@kroah.com>
+ +
diff --git a/drivers/staging/lirc/TODO.lirc_i2c b/drivers/staging/lirc/TODO.lirc_i2c
new file mode 100644
index 0000000..1f0a6ff
--- /dev/null
+++ b/drivers/staging/lirc/TODO.lirc_i2c
@@ -0,0 +1,3 @@
+lirc_i2c provides support for some drivers that have already a RC
+driver under drivers/media/video. It should be integrated into those
+drivers, in special with drivers/media/video/ir-kbd-i2c.c.
diff --git a/drivers/staging/lirc/lirc_bt829.c b/drivers/staging/lirc/lirc_bt829.c diff --git a/drivers/staging/lirc/lirc_bt829.c b/drivers/staging/lirc/lirc_bt829.c
new file mode 100644 new file mode 100644
index 0000000..d0f34b5 index 0000000..3388102
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/lirc_bt829.c +++ b/drivers/staging/lirc/lirc_bt829.c
@@ -0,0 +1,383 @@ @@ -0,0 +1,383 @@
@ -283,7 +297,7 @@ index 0000000..d0f34b5
+ pci_addr_phys = 0; + pci_addr_phys = 0;
+ if (my_dev->resource[0].flags & IORESOURCE_MEM) { + if (my_dev->resource[0].flags & IORESOURCE_MEM) {
+ pci_addr_phys = my_dev->resource[0].start; + pci_addr_phys = my_dev->resource[0].start;
+ printk(KERN_INFO DRIVER_NAME ": memory at 0x%08X \n", + printk(KERN_INFO DRIVER_NAME ": memory at 0x%08X\n",
+ (unsigned int)pci_addr_phys); + (unsigned int)pci_addr_phys);
+ } + }
+ if (pci_addr_phys == 0) { + if (pci_addr_phys == 0) {
@ -1241,7 +1255,7 @@ index 0000000..a152c52
+module_exit(ene_exit); +module_exit(ene_exit);
diff --git a/drivers/staging/lirc/lirc_ene0100.h b/drivers/staging/lirc/lirc_ene0100.h diff --git a/drivers/staging/lirc/lirc_ene0100.h b/drivers/staging/lirc/lirc_ene0100.h
new file mode 100644 new file mode 100644
index 0000000..825045d index 0000000..776b693
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/lirc_ene0100.h +++ b/drivers/staging/lirc/lirc_ene0100.h
@@ -0,0 +1,169 @@ @@ -0,0 +1,169 @@
@ -2519,7 +2533,7 @@ index 0000000..bce600e
+ +
diff --git a/drivers/staging/lirc/lirc_imon.c b/drivers/staging/lirc/lirc_imon.c diff --git a/drivers/staging/lirc/lirc_imon.c b/drivers/staging/lirc/lirc_imon.c
new file mode 100644 new file mode 100644
index 0000000..43856d6 index 0000000..6649325
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/lirc_imon.c +++ b/drivers/staging/lirc/lirc_imon.c
@@ -0,0 +1,1058 @@ @@ -0,0 +1,1058 @@
@ -2636,7 +2650,7 @@ index 0000000..43856d6
+ } tx; + } tx;
+}; +};
+ +
+static struct file_operations display_fops = { +static const struct file_operations display_fops = {
+ .owner = THIS_MODULE, + .owner = THIS_MODULE,
+ .open = &display_open, + .open = &display_open,
+ .write = &vfd_write, + .write = &vfd_write,
@ -3583,10 +3597,10 @@ index 0000000..43856d6
+module_exit(imon_exit); +module_exit(imon_exit);
diff --git a/drivers/staging/lirc/lirc_it87.c b/drivers/staging/lirc/lirc_it87.c diff --git a/drivers/staging/lirc/lirc_it87.c b/drivers/staging/lirc/lirc_it87.c
new file mode 100644 new file mode 100644
index 0000000..781abc3 index 0000000..ec11c0e
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/lirc_it87.c +++ b/drivers/staging/lirc/lirc_it87.c
@@ -0,0 +1,1019 @@ @@ -0,0 +1,1022 @@
+/* +/*
+ * LIRC driver for ITE IT8712/IT8705 CIR port + * LIRC driver for ITE IT8712/IT8705 CIR port
+ * + *
@ -3698,6 +3712,7 @@ index 0000000..781abc3
+ +
+static DEFINE_SPINLOCK(hardware_lock); +static DEFINE_SPINLOCK(hardware_lock);
+static DEFINE_SPINLOCK(dev_lock); +static DEFINE_SPINLOCK(dev_lock);
+static bool device_open;
+ +
+static int rx_buf[RBUF_LEN]; +static int rx_buf[RBUF_LEN];
+unsigned int rx_tail, rx_head; +unsigned int rx_tail, rx_head;
@ -3736,10 +3751,11 @@ index 0000000..781abc3
+static int lirc_open(struct inode *inode, struct file *file) +static int lirc_open(struct inode *inode, struct file *file)
+{ +{
+ spin_lock(&dev_lock); + spin_lock(&dev_lock);
+ if (module_refcount(THIS_MODULE)) { + if (device_open) {
+ spin_unlock(&dev_lock); + spin_unlock(&dev_lock);
+ return -EBUSY; + return -EBUSY;
+ } + }
+ device_open = true;
+ spin_unlock(&dev_lock); + spin_unlock(&dev_lock);
+ return 0; + return 0;
+} +}
@ -3747,6 +3763,9 @@ index 0000000..781abc3
+ +
+static int lirc_close(struct inode *inode, struct file *file) +static int lirc_close(struct inode *inode, struct file *file)
+{ +{
+ spin_lock(&dev_lock);
+ device_open = false;
+ spin_unlock(&dev_lock);
+ return 0; + return 0;
+} +}
+ +
@ -3918,7 +3937,7 @@ index 0000000..781abc3
+} +}
+ +
+ +
+static struct file_operations lirc_fops = { +static const struct file_operations lirc_fops = {
+ .owner = THIS_MODULE, + .owner = THIS_MODULE,
+ .read = lirc_read, + .read = lirc_read,
+ .write = lirc_write, + .write = lirc_write,
@ -3952,7 +3971,6 @@ index 0000000..781abc3
+}; +};
+ +
+ +
+#ifdef MODULE
+static int init_chrdev(void) +static int init_chrdev(void)
+{ +{
+ driver.minor = lirc_register_driver(&driver); + driver.minor = lirc_register_driver(&driver);
@ -3969,7 +3987,6 @@ index 0000000..781abc3
+{ +{
+ lirc_unregister_driver(driver.minor); + lirc_unregister_driver(driver.minor);
+} +}
+#endif
+ +
+ +
+/* SECTION: Hardware */ +/* SECTION: Hardware */
@ -5278,7 +5295,7 @@ index 0000000..9352f45
+MODULE_PARM_DESC(debug, "Enable debugging messages"); +MODULE_PARM_DESC(debug, "Enable debugging messages");
diff --git a/drivers/staging/lirc/lirc_parallel.c b/drivers/staging/lirc/lirc_parallel.c diff --git a/drivers/staging/lirc/lirc_parallel.c b/drivers/staging/lirc/lirc_parallel.c
new file mode 100644 new file mode 100644
index 0000000..df12e7b index 0000000..6da4a8c
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/lirc_parallel.c +++ b/drivers/staging/lirc/lirc_parallel.c
@@ -0,0 +1,705 @@ @@ -0,0 +1,705 @@
@ -5524,7 +5541,7 @@ index 0000000..df12e7b
+ unsigned int level, newlevel; + unsigned int level, newlevel;
+ unsigned int timeout; + unsigned int timeout;
+ +
+ if (!module_refcount(THIS_MODULE)) + if (!is_open)
+ return; + return;
+ +
+ if (!is_claimed) + if (!is_claimed)
@ -5799,7 +5816,7 @@ index 0000000..df12e7b
+ +
+static int lirc_open(struct inode *node, struct file *filep) +static int lirc_open(struct inode *node, struct file *filep)
+{ +{
+ if (module_refcount(THIS_MODULE) || !lirc_claim()) + if (is_open || !lirc_claim())
+ return -EBUSY; + return -EBUSY;
+ +
+ parport_enable_irq(pport); + parport_enable_irq(pport);
@ -5823,7 +5840,7 @@ index 0000000..df12e7b
+ return 0; + return 0;
+} +}
+ +
+static struct file_operations lirc_fops = { +static const struct file_operations lirc_fops = {
+ .owner = THIS_MODULE, + .owner = THIS_MODULE,
+ .llseek = lirc_lseek, + .llseek = lirc_lseek,
+ .read = lirc_read, + .read = lirc_read,
@ -6021,7 +6038,7 @@ index 0000000..4bed6af
+#endif +#endif
diff --git a/drivers/staging/lirc/lirc_sasem.c b/drivers/staging/lirc/lirc_sasem.c diff --git a/drivers/staging/lirc/lirc_sasem.c b/drivers/staging/lirc/lirc_sasem.c
new file mode 100644 new file mode 100644
index 0000000..9e516a1 index 0000000..73166c3
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/lirc_sasem.c +++ b/drivers/staging/lirc/lirc_sasem.c
@@ -0,0 +1,933 @@ @@ -0,0 +1,933 @@
@ -6146,7 +6163,7 @@ index 0000000..9e516a1
+}; +};
+ +
+/* VFD file operations */ +/* VFD file operations */
+static struct file_operations vfd_fops = { +static const struct file_operations vfd_fops = {
+ .owner = THIS_MODULE, + .owner = THIS_MODULE,
+ .open = &vfd_open, + .open = &vfd_open,
+ .write = &vfd_write, + .write = &vfd_write,
@ -6960,7 +6977,7 @@ index 0000000..9e516a1
+module_exit(sasem_exit); +module_exit(sasem_exit);
diff --git a/drivers/staging/lirc/lirc_serial.c b/drivers/staging/lirc/lirc_serial.c diff --git a/drivers/staging/lirc/lirc_serial.c b/drivers/staging/lirc/lirc_serial.c
new file mode 100644 new file mode 100644
index 0000000..d2ea3f0 index 0000000..9456f8e
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/lirc_serial.c +++ b/drivers/staging/lirc/lirc_serial.c
@@ -0,0 +1,1313 @@ @@ -0,0 +1,1313 @@
@ -8016,7 +8033,7 @@ index 0000000..d2ea3f0
+ return 0; + return 0;
+} +}
+ +
+static struct file_operations lirc_fops = { +static const struct file_operations lirc_fops = {
+ .owner = THIS_MODULE, + .owner = THIS_MODULE,
+ .write = lirc_write, + .write = lirc_write,
+ .unlocked_ioctl = lirc_ioctl, + .unlocked_ioctl = lirc_ioctl,
@ -8279,7 +8296,7 @@ index 0000000..d2ea3f0
+MODULE_PARM_DESC(debug, "Enable debugging messages"); +MODULE_PARM_DESC(debug, "Enable debugging messages");
diff --git a/drivers/staging/lirc/lirc_sir.c b/drivers/staging/lirc/lirc_sir.c diff --git a/drivers/staging/lirc/lirc_sir.c b/drivers/staging/lirc/lirc_sir.c
new file mode 100644 new file mode 100644
index 0000000..97146d1 index 0000000..eb08fa7
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/lirc_sir.c +++ b/drivers/staging/lirc/lirc_sir.c
@@ -0,0 +1,1282 @@ @@ -0,0 +1,1282 @@
@ -8736,7 +8753,7 @@ index 0000000..97146d1
+ wake_up_interruptible(&lirc_read_queue); + wake_up_interruptible(&lirc_read_queue);
+} +}
+ +
+static struct file_operations lirc_fops = { +static const struct file_operations lirc_fops = {
+ .owner = THIS_MODULE, + .owner = THIS_MODULE,
+ .read = lirc_read, + .read = lirc_read,
+ .write = lirc_write, + .write = lirc_write,
@ -9567,7 +9584,7 @@ index 0000000..97146d1
+MODULE_PARM_DESC(debug, "Enable debugging messages"); +MODULE_PARM_DESC(debug, "Enable debugging messages");
diff --git a/drivers/staging/lirc/lirc_streamzap.c b/drivers/staging/lirc/lirc_streamzap.c diff --git a/drivers/staging/lirc/lirc_streamzap.c b/drivers/staging/lirc/lirc_streamzap.c
new file mode 100644 new file mode 100644
index 0000000..5b46ac4 index 0000000..be09c10
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/lirc_streamzap.c +++ b/drivers/staging/lirc/lirc_streamzap.c
@@ -0,0 +1,821 @@ @@ -0,0 +1,821 @@
@ -10004,7 +10021,7 @@ index 0000000..5b46ac4
+ return; + return;
+} +}
+ +
+static struct file_operations streamzap_fops = { +static const struct file_operations streamzap_fops = {
+ .owner = THIS_MODULE, + .owner = THIS_MODULE,
+ .unlocked_ioctl = streamzap_ioctl, + .unlocked_ioctl = streamzap_ioctl,
+ .read = lirc_dev_fop_read, + .read = lirc_dev_fop_read,
@ -10394,10 +10411,10 @@ index 0000000..5b46ac4
+MODULE_PARM_DESC(debug, "Enable debugging messages"); +MODULE_PARM_DESC(debug, "Enable debugging messages");
diff --git a/drivers/staging/lirc/lirc_ttusbir.c b/drivers/staging/lirc/lirc_ttusbir.c diff --git a/drivers/staging/lirc/lirc_ttusbir.c b/drivers/staging/lirc/lirc_ttusbir.c
new file mode 100644 new file mode 100644
index 0000000..1f1da47 index 0000000..e345ab9
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/lirc_ttusbir.c +++ b/drivers/staging/lirc/lirc_ttusbir.c
@@ -0,0 +1,397 @@ @@ -0,0 +1,396 @@
+/* +/*
+ * lirc_ttusbir.c + * lirc_ttusbir.c
+ * + *
@ -10541,8 +10558,7 @@ index 0000000..1f1da47
+ * still have about 14 samples per pulse/space, i.e. we sample with 14 + * still have about 14 samples per pulse/space, i.e. we sample with 14
+ * times higher frequency than the signal frequency + * times higher frequency than the signal frequency
+ */ + */
+const unsigned char map_table[] = +const unsigned char map_table[] = {
+{
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -10797,7 +10813,7 @@ index 0000000..1f1da47
+module_exit(ttusbir_exit_module); +module_exit(ttusbir_exit_module);
diff --git a/drivers/staging/lirc/lirc_zilog.c b/drivers/staging/lirc/lirc_zilog.c diff --git a/drivers/staging/lirc/lirc_zilog.c b/drivers/staging/lirc/lirc_zilog.c
new file mode 100644 new file mode 100644
index 0000000..1b013bf index 0000000..100caab
--- /dev/null --- /dev/null
+++ b/drivers/staging/lirc/lirc_zilog.c +++ b/drivers/staging/lirc/lirc_zilog.c
@@ -0,0 +1,1387 @@ @@ -0,0 +1,1387 @@
@ -11935,7 +11951,7 @@ index 0000000..1b013bf
+ .id_table = ir_transceiver_id, + .id_table = ir_transceiver_id,
+}; +};
+ +
+static struct file_operations lirc_fops = { +static const struct file_operations lirc_fops = {
+ .owner = THIS_MODULE, + .owner = THIS_MODULE,
+ .llseek = lseek, + .llseek = lseek,
+ .read = read, + .read = read,