--- /dev/null
+From stable-bounces@linux.kernel.org Wed Dec 13 06:18:12 2006
+Date: Wed, 13 Dec 2006 14:12:15 +0000
+From: Russell King <rmk@arm.linux.org.uk>
+To: stable@kernel.org
+Message-ID: <20061213141215.GA21171@dyn-67.arm.linux.org.uk>
+Subject: ARM: Add sys_*at syscalls
+
+Later glibc requires the *at syscalls. Add them.
+
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+ arch/arm/kernel/calls.S | 13 +++++++++++++
+ include/asm-arm/unistd.h | 13 +++++++++++++
+ 2 files changed, 26 insertions(+)
+
+bca0b8e75f6b7cf52cf52c967286b72d84f9b37e
+--- linux-2.6.19.1.orig/arch/arm/kernel/calls.S
++++ linux-2.6.19.1/arch/arm/kernel/calls.S
+@@ -331,6 +331,19 @@
+ CALL(sys_mbind)
+ /* 320 */ CALL(sys_get_mempolicy)
+ CALL(sys_set_mempolicy)
++ CALL(sys_openat)
++ CALL(sys_mkdirat)
++ CALL(sys_mknodat)
++/* 325 */ CALL(sys_fchownat)
++ CALL(sys_futimesat)
++ CALL(sys_fstatat64)
++ CALL(sys_unlinkat)
++ CALL(sys_renameat)
++/* 330 */ CALL(sys_linkat)
++ CALL(sys_symlinkat)
++ CALL(sys_readlinkat)
++ CALL(sys_fchmodat)
++ CALL(sys_faccessat)
+ #ifndef syscalls_counted
+ .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
+ #define syscalls_counted
+--- linux-2.6.19.1.orig/include/asm-arm/unistd.h
++++ linux-2.6.19.1/include/asm-arm/unistd.h
+@@ -347,6 +347,19 @@
+ #define __NR_mbind (__NR_SYSCALL_BASE+319)
+ #define __NR_get_mempolicy (__NR_SYSCALL_BASE+320)
+ #define __NR_set_mempolicy (__NR_SYSCALL_BASE+321)
++#define __NR_openat (__NR_SYSCALL_BASE+322)
++#define __NR_mkdirat (__NR_SYSCALL_BASE+323)
++#define __NR_mknodat (__NR_SYSCALL_BASE+324)
++#define __NR_fchownat (__NR_SYSCALL_BASE+325)
++#define __NR_futimesat (__NR_SYSCALL_BASE+326)
++#define __NR_fstatat64 (__NR_SYSCALL_BASE+327)
++#define __NR_unlinkat (__NR_SYSCALL_BASE+328)
++#define __NR_renameat (__NR_SYSCALL_BASE+329)
++#define __NR_linkat (__NR_SYSCALL_BASE+330)
++#define __NR_symlinkat (__NR_SYSCALL_BASE+331)
++#define __NR_readlinkat (__NR_SYSCALL_BASE+332)
++#define __NR_fchmodat (__NR_SYSCALL_BASE+333)
++#define __NR_faccessat (__NR_SYSCALL_BASE+334)
+
+ /*
+ * The following SWIs are ARM private.
--- /dev/null
+From stable-bounces@linux.kernel.org Mon Dec 11 21:40:14 2006
+Message-ID: <457E3F63.2010208@linuxtv.org>
+Date: Tue, 12 Dec 2006 00:34:27 -0500
+From: Michael Krufky <mkrufky@linuxtv.org>
+To: stable@kernel.org
+Cc: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Adrian Bunk <bunk@stusta.de>
+Subject: DVB: lgdt330x: fix signal / lock status detection bug
+
+In some cases when using VSB, the AGC status register has been known to
+falsely report "no signal" when in fact there is a carrier lock. The
+datasheet labels these status flags as QAM only, yet the lgdt330x
+module is using these flags for both QAM and VSB.
+
+This patch allows for the carrier recovery lock status register to be
+tested, even if the agc signal status register falsely reports no signal.
+
+Thanks to jcrews from #linuxtv in irc, for initially reporting this bug.
+
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+
+---
+
+ drivers/media/dvb/frontends/lgdt330x.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+--- linux-2.6.19.1.orig/drivers/media/dvb/frontends/lgdt330x.c
++++ linux-2.6.19.1/drivers/media/dvb/frontends/lgdt330x.c
+@@ -435,9 +435,6 @@ static int lgdt3302_read_status(struct d
+ /* Test signal does not exist flag */
+ /* as well as the AGC lock flag. */
+ *status |= FE_HAS_SIGNAL;
+- } else {
+- /* Without a signal all other status bits are meaningless */
+- return 0;
+ }
+
+ /*
+@@ -500,9 +497,6 @@ static int lgdt3303_read_status(struct d
+ /* Test input signal does not exist flag */
+ /* as well as the AGC lock flag. */
+ *status |= FE_HAS_SIGNAL;
+- } else {
+- /* Without a signal all other status bits are meaningless */
+- return 0;
+ }
+
+ /* Carrier Recovery Lock Status Register */
--- /dev/null
+From stable-bounces@linux.kernel.org Tue Dec 12 20:05:58 2006
+Message-ID: <457F7AD0.3030005@gentoo.org>
+Date: Tue, 12 Dec 2006 23:00:16 -0500
+From: Daniel Drake <dsd@gentoo.org>
+To: stable@kernel.org
+Cc: stefanr@s5r6.in-berlin.de
+Subject: ieee1394: ohci1394: add PPC_PMAC platform code to driver probe
+
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+
+Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7431
+iBook G3 threw a machine check exception and put the display backlight
+to full brightness after ohci1394 was unloaded and reloaded.
+
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+[dsd@gentoo.org: also added missing if condition, commit
+ 63cca59e89892497e95e1e9c7156d3345fb7e2e8]
+Signed-off-by: Daniel Drake <dsd@gentoo.org>
+Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+It fixes a kernel oops which occurs when the ohci1394 driver is reloaded on PPC
+http://bugs.gentoo.org/154851
+
+ drivers/ieee1394/ohci1394.c | 21 ++++++++++++++++-----
+ 1 file changed, 16 insertions(+), 5 deletions(-)
+
+--- linux-2.6.19.1.orig/drivers/ieee1394/ohci1394.c
++++ linux-2.6.19.1/drivers/ieee1394/ohci1394.c
+@@ -3217,6 +3217,19 @@ static int __devinit ohci1394_pci_probe(
+ struct ti_ohci *ohci; /* shortcut to currently handled device */
+ resource_size_t ohci_base;
+
++#ifdef CONFIG_PPC_PMAC
++ /* Necessary on some machines if ohci1394 was loaded/ unloaded before */
++ if (machine_is(powermac)) {
++ struct device_node *of_node = pci_device_to_OF_node(dev);
++
++ if (of_node) {
++ pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, of_node,
++ 0, 1);
++ pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 1);
++ }
++ }
++#endif /* CONFIG_PPC_PMAC */
++
+ if (pci_enable_device(dev))
+ FAIL(-ENXIO, "Failed to enable OHCI hardware");
+ pci_set_master(dev);
+@@ -3505,11 +3518,9 @@ static void ohci1394_pci_remove(struct p
+ #endif
+
+ #ifdef CONFIG_PPC_PMAC
+- /* On UniNorth, power down the cable and turn off the chip
+- * clock when the module is removed to save power on
+- * laptops. Turning it back ON is done by the arch code when
+- * pci_enable_device() is called */
+- {
++ /* On UniNorth, power down the cable and turn off the chip clock
++ * to save power on laptops */
++ if (machine_is(powermac)) {
+ struct device_node* of_node;
+
+ of_node = pci_device_to_OF_node(ohci->dev);
--- /dev/null
+From stable-bounces@linux.kernel.org Tue Dec 12 20:10:02 2006
+Message-ID: <457F7BC3.3020508@gentoo.org>
+Date: Tue, 12 Dec 2006 23:04:19 -0500
+From: Daniel Drake <dsd@gentoo.org>
+To: stable@kernel.org
+Cc: zippel@linux-m68k.org
+Subject: kbuild: don't put temp files in source
+
+From: Roman Zippel <zippel@linux-m68k.org>
+
+The as-instr/ld-option need to create temporary files, but create them in the
+output directory, when compiling external modules. Reformat them a bit and
+use $(CC) instead of $(AS) as the former is used by kbuild to assemble files.
+
+Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
+Cc: Andi Kleen <ak@suse.de>
+Cc: Jan Beulich <jbeulich@novell.com>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: <jpdenheijer@gmail.com>
+Cc: Horst Schirmeier <horst@schirmeier.com>
+Cc: Daniel Drake <dsd@gentoo.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+It fixes building of external modules in a sandboxed environment.
+http://bugs.gentoo.org/149307
+
+ scripts/Kbuild.include | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+--- linux-2.6.19.1.orig/scripts/Kbuild.include
++++ linux-2.6.19.1/scripts/Kbuild.include
+@@ -56,6 +56,9 @@ endef
+ # gcc support functions
+ # See documentation in Documentation/kbuild/makefiles.txt
+
++# output directory for tests below
++TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
++
+ # as-option
+ # Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,)
+
+@@ -66,9 +69,11 @@ as-option = $(shell if $(CC) $(CFLAGS) $
+ # as-instr
+ # Usage: cflags-y += $(call as-instr, instr, option1, option2)
+
+-as-instr = $(shell if echo -e "$(1)" | $(AS) >/dev/null 2>&1 -W -Z -o astest$$$$.out ; \
+- then echo "$(2)"; else echo "$(3)"; fi; \
+- rm -f astest$$$$.out)
++as-instr = $(shell if echo -e "$(1)" | \
++ $(CC) $(AFLAGS) -c -xassembler - \
++ -o $(TMPOUT)astest$$$$.out > /dev/null 2>&1; \
++ then rm $(TMPOUT)astest$$$$.out; echo "$(2)"; \
++ else echo "$(3)"; fi)
+
+ # cc-option
+ # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
+@@ -97,10 +102,10 @@ cc-ifversion = $(shell if [ $(call cc-ve
+
+ # ld-option
+ # Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both)
+-ld-option = $(shell if $(CC) $(1) \
+- -nostdlib -o ldtest$$$$.out -xc /dev/null \
+- > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi; \
+- rm -f ldtest$$$$.out)
++ld-option = $(shell if $(CC) $(1) -nostdlib -xc /dev/null \
++ -o $(TMPOUT)ldtest$$$$.out > /dev/null 2>&1; \
++ then rm $(TMPOUT)ldtest$$$$.out; echo "$(1)"; \
++ else echo "$(2)"; fi)
+
+ ###
+ # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
--- /dev/null
+From stable-bounces@linux.kernel.org Tue Dec 12 20:04:28 2006
+Message-ID: <457F7A78.6090102@gentoo.org>
+Date: Tue, 12 Dec 2006 22:58:48 -0500
+From: Daniel Drake <dsd@gentoo.org>
+To: stable@kernel.org
+Cc: htejun@gmail.com
+Subject: libata: handle 0xff status properly
+
+From: Tejun Heo <htejun@gmail.com>
+
+libata waits for !BSY even when the status register reports 0xff.
+This causes long boot delays when D8 isn't pulled down properly. This
+patch does the followings.
+
+* don't wait if status register is 0xff in all wait functions
+
+* make ata_busy_sleep() return 0 on success and -errno on failure.
+ -ENODEV is returned on 0xff status and -EBUSY on other failures.
+
+* make ata_bus_softreset() succeed on 0xff status. 0xff status is not
+ reset failure. It indicates no device. This removes unnecessary
+ retries on such ports. Note that the code change assumes unoccupied
+ port reporting 0xff status does not produce valid device signature.
+
+Signed-off-by: Tejun Heo <htejun@gmail.com>
+Cc: Joe Jin <lkmaillist@gmail.com>
+Signed-off-by: Jeff Garzik <jeff@garzik.org>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+It fixes a long delay during booting for some hardware.
+http://bugs.gentoo.org/157326
+
+ drivers/ata/libata-core.c | 30 ++++++++++++++++++------------
+ include/linux/libata.h | 9 ++++-----
+ 2 files changed, 22 insertions(+), 17 deletions(-)
+
+--- linux-2.6.19.1.orig/drivers/ata/libata-core.c
++++ linux-2.6.19.1/drivers/ata/libata-core.c
+@@ -2325,11 +2325,14 @@ static inline void ata_tf_to_host(struct
+ * Sleep until ATA Status register bit BSY clears,
+ * or a timeout occurs.
+ *
+- * LOCKING: None.
++ * LOCKING:
++ * Kernel thread context (may sleep).
++ *
++ * RETURNS:
++ * 0 on success, -errno otherwise.
+ */
+-
+-unsigned int ata_busy_sleep (struct ata_port *ap,
+- unsigned long tmout_pat, unsigned long tmout)
++int ata_busy_sleep(struct ata_port *ap,
++ unsigned long tmout_pat, unsigned long tmout)
+ {
+ unsigned long timer_start, timeout;
+ u8 status;
+@@ -2337,27 +2340,32 @@ unsigned int ata_busy_sleep (struct ata_
+ status = ata_busy_wait(ap, ATA_BUSY, 300);
+ timer_start = jiffies;
+ timeout = timer_start + tmout_pat;
+- while ((status & ATA_BUSY) && (time_before(jiffies, timeout))) {
++ while (status != 0xff && (status & ATA_BUSY) &&
++ time_before(jiffies, timeout)) {
+ msleep(50);
+ status = ata_busy_wait(ap, ATA_BUSY, 3);
+ }
+
+- if (status & ATA_BUSY)
++ if (status != 0xff && (status & ATA_BUSY))
+ ata_port_printk(ap, KERN_WARNING,
+ "port is slow to respond, please be patient "
+ "(Status 0x%x)\n", status);
+
+ timeout = timer_start + tmout;
+- while ((status & ATA_BUSY) && (time_before(jiffies, timeout))) {
++ while (status != 0xff && (status & ATA_BUSY) &&
++ time_before(jiffies, timeout)) {
+ msleep(50);
+ status = ata_chk_status(ap);
+ }
+
++ if (status == 0xff)
++ return -ENODEV;
++
+ if (status & ATA_BUSY) {
+ ata_port_printk(ap, KERN_ERR, "port failed to respond "
+ "(%lu secs, Status 0x%x)\n",
+ tmout / HZ, status);
+- return 1;
++ return -EBUSY;
+ }
+
+ return 0;
+@@ -2448,10 +2456,8 @@ static unsigned int ata_bus_softreset(st
+ * the bus shows 0xFF because the odd clown forgets the D7
+ * pulldown resistor.
+ */
+- if (ata_check_status(ap) == 0xFF) {
+- ata_port_printk(ap, KERN_ERR, "SRST failed (status 0xFF)\n");
+- return AC_ERR_OTHER;
+- }
++ if (ata_check_status(ap) == 0xFF)
++ return 0;
+
+ ata_bus_post_reset(ap, devmask);
+
+--- linux-2.6.19.1.orig/include/linux/libata.h
++++ linux-2.6.19.1/include/linux/libata.h
+@@ -744,9 +744,8 @@ extern int ata_scsi_device_suspend(struc
+ extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
+ extern void ata_host_resume(struct ata_host *host);
+ extern int ata_ratelimit(void);
+-extern unsigned int ata_busy_sleep(struct ata_port *ap,
+- unsigned long timeout_pat,
+- unsigned long timeout);
++extern int ata_busy_sleep(struct ata_port *ap,
++ unsigned long timeout_pat, unsigned long timeout);
+ extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *),
+ void *data, unsigned long delay);
+ extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val,
+@@ -1061,7 +1060,7 @@ static inline u8 ata_busy_wait(struct at
+ udelay(10);
+ status = ata_chk_status(ap);
+ max--;
+- } while ((status & bits) && (max > 0));
++ } while (status != 0xff && (status & bits) && (max > 0));
+
+ return status;
+ }
+@@ -1082,7 +1081,7 @@ static inline u8 ata_wait_idle(struct at
+ {
+ u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
+
+- if (status & (ATA_BUSY | ATA_DRQ)) {
++ if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) {
+ unsigned long l = ap->ioaddr.status_addr;
+ if (ata_msg_warn(ap))
+ printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%lX\n",
--- /dev/null
+From stable-bounces@linux.kernel.org Tue Dec 12 20:02:04 2006
+Message-ID: <457F79E1.6010005@gentoo.org>
+Date: Tue, 12 Dec 2006 22:56:17 -0500
+From: Daniel Drake <dsd@gentoo.org>
+To: stable@kernel.org
+Cc: linville@tuxdriver.com
+Subject: Revert "[PATCH] zd1211rw: Removed unneeded packed attributes"
+
+From: John W. Linville <linville@tuxdriver.com>
+
+This reverts commit 4e1bbd846d00a245dcf78b6b331d8a9afed8e6d7.
+
+Quoth Daniel Drake <dsd@gentoo.org>:
+
+"A user reported that commit 4e1bbd846d00a245dcf78b6b331d8a9afed8e6d7
+(Remove unneeded packed attributes) breaks the zd1211rw driver on ARM."
+
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+ drivers/net/wireless/zd1211rw/zd_ieee80211.h | 2 +-
+ drivers/net/wireless/zd1211rw/zd_mac.c | 2 +-
+ drivers/net/wireless/zd1211rw/zd_mac.h | 4 ++--
+ drivers/net/wireless/zd1211rw/zd_usb.h | 14 +++++++-------
+ 4 files changed, 11 insertions(+), 11 deletions(-)
+
+--- linux-2.6.19.1.orig/drivers/net/wireless/zd1211rw/zd_ieee80211.h
++++ linux-2.6.19.1/drivers/net/wireless/zd1211rw/zd_ieee80211.h
+@@ -64,7 +64,7 @@ struct cck_plcp_header {
+ u8 service;
+ __le16 length;
+ __le16 crc16;
+-};
++} __attribute__((packed));
+
+ static inline u8 zd_cck_plcp_header_rate(const struct cck_plcp_header *header)
+ {
+--- linux-2.6.19.1.orig/drivers/net/wireless/zd1211rw/zd_mac.c
++++ linux-2.6.19.1/drivers/net/wireless/zd1211rw/zd_mac.c
+@@ -721,7 +721,7 @@ struct zd_rt_hdr {
+ u8 rt_rate;
+ u16 rt_channel;
+ u16 rt_chbitmask;
+-};
++} __attribute__((packed));
+
+ static void fill_rt_header(void *buffer, struct zd_mac *mac,
+ const struct ieee80211_rx_stats *stats,
+--- linux-2.6.19.1.orig/drivers/net/wireless/zd1211rw/zd_mac.h
++++ linux-2.6.19.1/drivers/net/wireless/zd1211rw/zd_mac.h
+@@ -82,7 +82,7 @@ struct zd_ctrlset {
+ struct rx_length_info {
+ __le16 length[3];
+ __le16 tag;
+-};
++} __attribute__((packed));
+
+ #define RX_LENGTH_INFO_TAG 0x697e
+
+@@ -93,7 +93,7 @@ struct rx_status {
+ u8 signal_quality_ofdm;
+ u8 decryption_type;
+ u8 frame_status;
+-};
++} __attribute__((packed));
+
+ /* rx_status field decryption_type */
+ #define ZD_RX_NO_WEP 0
+--- linux-2.6.19.1.orig/drivers/net/wireless/zd1211rw/zd_usb.h
++++ linux-2.6.19.1/drivers/net/wireless/zd1211rw/zd_usb.h
+@@ -74,17 +74,17 @@ enum control_requests {
+ struct usb_req_read_regs {
+ __le16 id;
+ __le16 addr[0];
+-};
++} __attribute__((packed));
+
+ struct reg_data {
+ __le16 addr;
+ __le16 value;
+-};
++} __attribute__((packed));
+
+ struct usb_req_write_regs {
+ __le16 id;
+ struct reg_data reg_writes[0];
+-};
++} __attribute__((packed));
+
+ enum {
+ RF_IF_LE = 0x02,
+@@ -101,7 +101,7 @@ struct usb_req_rfwrite {
+ /* RF2595: 24 */
+ __le16 bit_values[0];
+ /* (CR203 & ~(RF_IF_LE | RF_CLK | RF_DATA)) | (bit ? RF_DATA : 0) */
+-};
++} __attribute__((packed));
+
+ /* USB interrupt */
+
+@@ -118,12 +118,12 @@ enum usb_int_flags {
+ struct usb_int_header {
+ u8 type; /* must always be 1 */
+ u8 id;
+-};
++} __attribute__((packed));
+
+ struct usb_int_regs {
+ struct usb_int_header hdr;
+ struct reg_data regs[0];
+-};
++} __attribute__((packed));
+
+ struct usb_int_retry_fail {
+ struct usb_int_header hdr;
+@@ -131,7 +131,7 @@ struct usb_int_retry_fail {
+ u8 _dummy;
+ u8 addr[ETH_ALEN];
+ u8 ibss_wakeup_dest;
+-};
++} __attribute__((packed));
+
+ struct read_regs_int {
+ struct completion completion;
ieee80211softmac-fix-mutex_lock-at-exit-of-ieee80211_softmac_get_genie.patch
x86-64-mark-rdtsc-as-sync-only-for-netburst-not-for-core2.patch
bonding-incorrect-bonding-state-reported-via-ioctl.patch
+dvb-lgdt330x-fix-signal-lock-status-detection-bug.patch
+v4l-fix-broken-tuner_lg_ntsc_tape-radio-support.patch
+revert-zd1211rw-removed-unneeded-packed-attributes.patch
+libata-handle-0xff-status-properly.patch
+ieee1394-ohci1394-add-ppc_pmac-platform-code-to-driver-probe.patch
+kbuild-don-t-put-temp-files-in-source.patch
+arm-add-sys_-at-syscalls.patch
--- /dev/null
+From stable-bounces@linux.kernel.org Mon Dec 11 21:42:38 2006
+Message-ID: <457E3FE7.5090709@linuxtv.org>
+Date: Tue, 12 Dec 2006 00:36:39 -0500
+From: Michael Krufky <mkrufky@linuxtv.org>
+To: stable@kernel.org
+Cc: Hans Verkuil <hverkuil@xs4all.nl>, v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Mauro Carvalho Chehab <mchehab@infradead.org>
+Subject: V4L: Fix broken TUNER_LG_NTSC_TAPE radio support
+
+From: Hans Verkuil <hverkuil@xs4all.nl>
+
+The TUNER_LG_NTSC_TAPE is identical in all respects to the
+TUNER_PHILIPS_FM1236_MK3. So use the params struct for the Philips tuner.
+Also add this LG_NTSC_TAPE tuner to the switches where radio specific
+parameters are set so it behaves like a TUNER_PHILIPS_FM1236_MK3. This
+change fixes the radio support for this tuner (the wrong bandswitch byte
+was used).
+
+Thanks to Andy Walls <cwalls@radix.net> for finding this bug.
+
+Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+
+---
+
+ drivers/media/video/tuner-simple.c | 2 ++
+ drivers/media/video/tuner-types.c | 14 ++------------
+ 2 files changed, 4 insertions(+), 12 deletions(-)
+
+--- linux-2.6.19.1.orig/drivers/media/video/tuner-simple.c
++++ linux-2.6.19.1/drivers/media/video/tuner-simple.c
+@@ -108,6 +108,7 @@ static int tuner_stereo(struct i2c_clien
+ case TUNER_PHILIPS_FM1216ME_MK3:
+ case TUNER_PHILIPS_FM1236_MK3:
+ case TUNER_PHILIPS_FM1256_IH3:
++ case TUNER_LG_NTSC_TAPE:
+ stereo = ((status & TUNER_SIGNAL) == TUNER_STEREO_MK3);
+ break;
+ default:
+@@ -421,6 +422,7 @@ static void default_set_radio_freq(struc
+ case TUNER_PHILIPS_FM1216ME_MK3:
+ case TUNER_PHILIPS_FM1236_MK3:
+ case TUNER_PHILIPS_FMD1216ME_MK3:
++ case TUNER_LG_NTSC_TAPE:
+ buffer[3] = 0x19;
+ break;
+ case TUNER_TNF_5335MF:
+--- linux-2.6.19.1.orig/drivers/media/video/tuner-types.c
++++ linux-2.6.19.1/drivers/media/video/tuner-types.c
+@@ -672,16 +672,6 @@ static struct tuner_params tuner_panason
+ },
+ };
+
+-/* ------------ TUNER_LG_NTSC_TAPE - LGINNOTEK NTSC ------------ */
+-
+-static struct tuner_params tuner_lg_ntsc_tape_params[] = {
+- {
+- .type = TUNER_PARAM_TYPE_NTSC,
+- .ranges = tuner_fm1236_mk3_ntsc_ranges,
+- .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges),
+- },
+-};
+-
+ /* ------------ TUNER_TNF_8831BGFF - Philips PAL ------------ */
+
+ static struct tuner_range tuner_tnf_8831bgff_pal_ranges[] = {
+@@ -1331,8 +1321,8 @@ struct tunertype tuners[] = {
+ },
+ [TUNER_LG_NTSC_TAPE] = { /* LGINNOTEK NTSC */
+ .name = "LG NTSC (TAPE series)",
+- .params = tuner_lg_ntsc_tape_params,
+- .count = ARRAY_SIZE(tuner_lg_ntsc_tape_params),
++ .params = tuner_fm1236_mk3_params,
++ .count = ARRAY_SIZE(tuner_fm1236_mk3_params),
+ },
+ [TUNER_TNF_8831BGFF] = { /* Philips PAL */
+ .name = "Tenna TNF 8831 BGFF)",