From bcb63314e2c23f1ed622418b65f9409512659c73 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Fri, 28 Oct 2016 09:31:20 -0200 Subject: [media] media: Drop FSF's postal address from the source code files Drop the FSF's postal address from the source code files that typically contain mostly the license text. Of the 628 removed instances, 578 are outdated. The patch has been created with the following command without manual edits: git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \ drivers/media/ include/media|while read i; do i=$i perl -e ' open(F,"< $ENV{i}"); $a=join("", ); $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m && $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m; close(F); open(F, "> $ENV{i}"); print F $a; close(F);'; done Signed-off-by: Sakari Ailus --- drivers/media/usb/au0828/au0828-cards.c | 4 ---- drivers/media/usb/au0828/au0828-cards.h | 4 ---- drivers/media/usb/au0828/au0828-core.c | 4 ---- drivers/media/usb/au0828/au0828-dvb.c | 4 ---- drivers/media/usb/au0828/au0828-i2c.c | 4 ---- drivers/media/usb/au0828/au0828-reg.h | 4 ---- drivers/media/usb/au0828/au0828-video.c | 5 ----- drivers/media/usb/au0828/au0828.h | 4 ---- drivers/media/usb/cpia2/cpia2.h | 4 ---- drivers/media/usb/cpia2/cpia2_core.c | 4 ---- drivers/media/usb/cpia2/cpia2_registers.h | 4 ---- drivers/media/usb/cpia2/cpia2_usb.c | 4 ---- drivers/media/usb/cpia2/cpia2_v4l.c | 4 ---- drivers/media/usb/cx231xx/cx231xx-417.c | 4 ---- drivers/media/usb/cx231xx/cx231xx-audio.c | 4 ---- drivers/media/usb/cx231xx/cx231xx-dif.h | 4 ---- drivers/media/usb/dvb-usb-v2/af9015.c | 4 ---- drivers/media/usb/dvb-usb-v2/af9015.h | 4 ---- drivers/media/usb/dvb-usb-v2/anysee.c | 4 ---- drivers/media/usb/dvb-usb-v2/anysee.h | 4 ---- drivers/media/usb/dvb-usb-v2/au6610.c | 4 ---- drivers/media/usb/dvb-usb-v2/au6610.h | 4 ---- drivers/media/usb/dvb-usb-v2/ce6230.c | 4 ---- drivers/media/usb/dvb-usb-v2/ce6230.h | 4 ---- drivers/media/usb/dvb-usb-v2/dvbsky.c | 4 ---- drivers/media/usb/dvb-usb-v2/ec168.c | 4 ---- drivers/media/usb/dvb-usb-v2/ec168.h | 4 ---- drivers/media/usb/dvb-usb-v2/lmedm04.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-demod.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-demod.h | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.h | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.h | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-phy.h | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-reg.h | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c | 4 ---- drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.h | 4 ---- drivers/media/usb/dvb-usb/af9005-fe.c | 4 ---- drivers/media/usb/dvb-usb/af9005-remote.c | 4 ---- drivers/media/usb/dvb-usb/af9005.c | 4 ---- drivers/media/usb/dvb-usb/af9005.h | 4 ---- drivers/media/usb/dvb-usb/cinergyT2-core.c | 4 ---- drivers/media/usb/dvb-usb/cinergyT2-fe.c | 4 ---- drivers/media/usb/dvb-usb/cinergyT2.h | 4 ---- drivers/media/usb/dvb-usb/dtv5100.c | 4 ---- drivers/media/usb/dvb-usb/dtv5100.h | 4 ---- drivers/media/usb/dvb-usb/technisat-usb2.c | 4 ---- drivers/media/usb/em28xx/em28xx-audio.c | 4 ---- drivers/media/usb/gspca/autogain_functions.c | 4 ---- drivers/media/usb/gspca/benq.c | 4 ---- drivers/media/usb/gspca/conex.c | 4 ---- drivers/media/usb/gspca/cpia1.c | 4 ---- drivers/media/usb/gspca/etoms.c | 4 ---- drivers/media/usb/gspca/finepix.c | 4 ---- drivers/media/usb/gspca/gspca.c | 4 ---- drivers/media/usb/gspca/jeilinj.c | 4 ---- drivers/media/usb/gspca/jl2005bcd.c | 4 ---- drivers/media/usb/gspca/jpeg.h | 4 ---- drivers/media/usb/gspca/kinect.c | 4 ---- drivers/media/usb/gspca/konica.c | 4 ---- drivers/media/usb/gspca/mars.c | 4 ---- drivers/media/usb/gspca/mr97310a.c | 4 ---- drivers/media/usb/gspca/nw80x.c | 4 ---- drivers/media/usb/gspca/ov519.c | 4 ---- drivers/media/usb/gspca/ov534.c | 4 ---- drivers/media/usb/gspca/ov534_9.c | 4 ---- drivers/media/usb/gspca/pac207.c | 4 ---- drivers/media/usb/gspca/pac7302.c | 4 ---- drivers/media/usb/gspca/pac7311.c | 4 ---- drivers/media/usb/gspca/pac_common.h | 4 ---- drivers/media/usb/gspca/se401.c | 4 ---- drivers/media/usb/gspca/se401.h | 4 ---- drivers/media/usb/gspca/sn9c2028.c | 4 ---- drivers/media/usb/gspca/sn9c2028.h | 4 ---- drivers/media/usb/gspca/sn9c20x.c | 4 ---- drivers/media/usb/gspca/sonixb.c | 4 ---- drivers/media/usb/gspca/sonixj.c | 4 ---- drivers/media/usb/gspca/spca1528.c | 4 ---- drivers/media/usb/gspca/spca500.c | 4 ---- drivers/media/usb/gspca/spca501.c | 4 ---- drivers/media/usb/gspca/spca505.c | 4 ---- drivers/media/usb/gspca/spca506.c | 4 ---- drivers/media/usb/gspca/spca508.c | 4 ---- drivers/media/usb/gspca/spca561.c | 4 ---- drivers/media/usb/gspca/sq905.c | 4 ---- drivers/media/usb/gspca/sq905c.c | 4 ---- drivers/media/usb/gspca/sq930x.c | 4 ---- drivers/media/usb/gspca/stk014.c | 4 ---- drivers/media/usb/gspca/stk1135.c | 4 ---- drivers/media/usb/gspca/stk1135.h | 4 ---- drivers/media/usb/gspca/stv0680.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx.h | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c | 4 ---- drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h | 4 ---- drivers/media/usb/gspca/sunplus.c | 4 ---- drivers/media/usb/gspca/t613.c | 4 ---- drivers/media/usb/gspca/tv8532.c | 4 ---- drivers/media/usb/gspca/vc032x.c | 4 ---- drivers/media/usb/gspca/vicam.c | 4 ---- drivers/media/usb/gspca/w996Xcf.c | 4 ---- drivers/media/usb/gspca/xirlink_cit.c | 4 ---- drivers/media/usb/gspca/zc3xx.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-audio.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-audio.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-context.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-context.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-ctrl.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-ctrl.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-debug.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-debugifc.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-debugifc.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-devattr.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-devattr.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-dvb.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-eeprom.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-eeprom.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-encoder.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-encoder.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-fx2-cmd.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-hdw.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-io.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-io.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-ioread.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-ioread.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-main.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-std.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-std.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-sysfs.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-sysfs.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-util.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-v4l2.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-video-v4l.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-wm8775.c | 4 ---- drivers/media/usb/pvrusb2/pvrusb2-wm8775.h | 4 ---- drivers/media/usb/pvrusb2/pvrusb2.h | 4 ---- drivers/media/usb/s2255/s2255drv.c | 4 ---- drivers/media/usb/stkwebcam/stk-sensor.c | 4 ---- drivers/media/usb/stkwebcam/stk-webcam.c | 4 ---- drivers/media/usb/stkwebcam/stk-webcam.h | 4 ---- drivers/media/usb/tm6000/tm6000-cards.c | 4 ---- drivers/media/usb/tm6000/tm6000-core.c | 4 ---- drivers/media/usb/tm6000/tm6000-dvb.c | 4 ---- drivers/media/usb/tm6000/tm6000-i2c.c | 4 ---- drivers/media/usb/tm6000/tm6000-input.c | 4 ---- drivers/media/usb/tm6000/tm6000-regs.h | 4 ---- drivers/media/usb/tm6000/tm6000-stds.c | 4 ---- drivers/media/usb/tm6000/tm6000-usb-isoc.h | 4 ---- drivers/media/usb/tm6000/tm6000-video.c | 4 ---- drivers/media/usb/tm6000/tm6000.h | 4 ---- drivers/media/usb/ttusb-dec/ttusb_dec.c | 4 ---- drivers/media/usb/ttusb-dec/ttusbdecfe.c | 4 ---- drivers/media/usb/ttusb-dec/ttusbdecfe.h | 4 ---- drivers/media/usb/usbvision/usbvision-cards.c | 4 ---- drivers/media/usb/usbvision/usbvision-core.c | 4 ---- drivers/media/usb/usbvision/usbvision-i2c.c | 4 ---- drivers/media/usb/usbvision/usbvision-video.c | 4 ---- drivers/media/usb/usbvision/usbvision.h | 4 ---- drivers/media/usb/zr364xx/zr364xx.c | 4 ---- 178 files changed, 713 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/au0828/au0828-cards.c b/drivers/media/usb/au0828/au0828-cards.c index 6b469e8c4c6e..313f659f0bfb 100644 --- a/drivers/media/usb/au0828/au0828-cards.c +++ b/drivers/media/usb/au0828/au0828-cards.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "au0828.h" diff --git a/drivers/media/usb/au0828/au0828-cards.h b/drivers/media/usb/au0828/au0828-cards.h index 48a1882c2b6b..1f4412ee6da4 100644 --- a/drivers/media/usb/au0828/au0828-cards.h +++ b/drivers/media/usb/au0828/au0828-cards.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define AU0828_BOARD_UNKNOWN 0 diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index bf53553d2624..4e14e1125f8e 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "au0828.h" diff --git a/drivers/media/usb/au0828/au0828-dvb.c b/drivers/media/usb/au0828/au0828-dvb.c index 0e174e860614..7e0c9b795e52 100644 --- a/drivers/media/usb/au0828/au0828-dvb.c +++ b/drivers/media/usb/au0828/au0828-dvb.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "au0828.h" diff --git a/drivers/media/usb/au0828/au0828-i2c.c b/drivers/media/usb/au0828/au0828-i2c.c index ae7ac6669769..42b352bb4f02 100644 --- a/drivers/media/usb/au0828/au0828-i2c.c +++ b/drivers/media/usb/au0828/au0828-i2c.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "au0828.h" diff --git a/drivers/media/usb/au0828/au0828-reg.h b/drivers/media/usb/au0828/au0828-reg.h index 2140f4cfb645..7aaf10739c8b 100644 --- a/drivers/media/usb/au0828/au0828-reg.h +++ b/drivers/media/usb/au0828/au0828-reg.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* We'll start to rename these registers once we have a better diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c index 7a10eaa38f67..16f9125a985a 100644 --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c @@ -13,11 +13,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. */ /* Developer Notes: diff --git a/drivers/media/usb/au0828/au0828.h b/drivers/media/usb/au0828/au0828.h index dd7b378fe070..88e59748ebc2 100644 --- a/drivers/media/usb/au0828/au0828.h +++ b/drivers/media/usb/au0828/au0828.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/cpia2/cpia2.h b/drivers/media/usb/cpia2/cpia2.h index cdef677d57ec..81f72c0b561f 100644 --- a/drivers/media/usb/cpia2/cpia2.h +++ b/drivers/media/usb/cpia2/cpia2.h @@ -22,10 +22,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * ****************************************************************************/ #ifndef __CPIA2_H__ diff --git a/drivers/media/usb/cpia2/cpia2_core.c b/drivers/media/usb/cpia2/cpia2_core.c index 0310fd6ed103..431dd0b4b332 100644 --- a/drivers/media/usb/cpia2/cpia2_core.c +++ b/drivers/media/usb/cpia2/cpia2_core.c @@ -20,10 +20,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * Stripped of 2.4 stuff ready for main kernel submit by * Alan Cox * diff --git a/drivers/media/usb/cpia2/cpia2_registers.h b/drivers/media/usb/cpia2/cpia2_registers.h index 3bbec514a967..eebe46ea9c01 100644 --- a/drivers/media/usb/cpia2/cpia2_registers.h +++ b/drivers/media/usb/cpia2/cpia2_registers.h @@ -17,10 +17,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * ****************************************************************************/ #ifndef CPIA2_REGISTER_HEADER diff --git a/drivers/media/usb/cpia2/cpia2_usb.c b/drivers/media/usb/cpia2/cpia2_usb.c index 37f9b30b0abc..7a50662348f6 100644 --- a/drivers/media/usb/cpia2/cpia2_usb.c +++ b/drivers/media/usb/cpia2/cpia2_usb.c @@ -20,10 +20,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * Stripped of 2.4 stuff ready for main kernel submit by * Alan Cox ****************************************************************************/ diff --git a/drivers/media/usb/cpia2/cpia2_v4l.c b/drivers/media/usb/cpia2/cpia2_v4l.c index 9caea8344547..7122023e7004 100644 --- a/drivers/media/usb/cpia2/cpia2_v4l.c +++ b/drivers/media/usb/cpia2/cpia2_v4l.c @@ -21,10 +21,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * Stripped of 2.4 stuff ready for main kernel submit by * Alan Cox ****************************************************************************/ diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c index 29d450c15f29..509d9711d590 100644 --- a/drivers/media/usb/cx231xx/cx231xx-417.c +++ b/drivers/media/usb/cx231xx/cx231xx-417.c @@ -18,10 +18,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "cx231xx.h" diff --git a/drivers/media/usb/cx231xx/cx231xx-audio.c b/drivers/media/usb/cx231xx/cx231xx-audio.c index 8263c4b0610b..cf80842dfa08 100644 --- a/drivers/media/usb/cx231xx/cx231xx-audio.c +++ b/drivers/media/usb/cx231xx/cx231xx-audio.c @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "cx231xx.h" diff --git a/drivers/media/usb/cx231xx/cx231xx-dif.h b/drivers/media/usb/cx231xx/cx231xx-dif.h index 2b63c2f6d3b0..2b9eb9fd7c52 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dif.h +++ b/drivers/media/usb/cx231xx/cx231xx-dif.h @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY, without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program, if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _CX231XX_DIF_H diff --git a/drivers/media/usb/dvb-usb-v2/af9015.c b/drivers/media/usb/dvb-usb-v2/af9015.c index 29011dfabb11..caa1e6101f58 100644 --- a/drivers/media/usb/dvb-usb-v2/af9015.c +++ b/drivers/media/usb/dvb-usb-v2/af9015.c @@ -15,10 +15,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #include "af9015.h" diff --git a/drivers/media/usb/dvb-usb-v2/af9015.h b/drivers/media/usb/dvb-usb-v2/af9015.h index 1db1bb0d57bc..2dd9231a8ece 100644 --- a/drivers/media/usb/dvb-usb-v2/af9015.h +++ b/drivers/media/usb/dvb-usb-v2/af9015.h @@ -15,10 +15,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #ifndef AF9015_H diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c b/drivers/media/usb/dvb-usb-v2/anysee.c index ae917c042a52..6795c0c609b1 100644 --- a/drivers/media/usb/dvb-usb-v2/anysee.c +++ b/drivers/media/usb/dvb-usb-v2/anysee.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * TODO: * - add smart card reader support for Conditional Access (CA) * diff --git a/drivers/media/usb/dvb-usb-v2/anysee.h b/drivers/media/usb/dvb-usb-v2/anysee.h index 3ca2bca4ebaf..393e2fce2aed 100644 --- a/drivers/media/usb/dvb-usb-v2/anysee.h +++ b/drivers/media/usb/dvb-usb-v2/anysee.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * TODO: * - add smart card reader support for Conditional Access (CA) * diff --git a/drivers/media/usb/dvb-usb-v2/au6610.c b/drivers/media/usb/dvb-usb-v2/au6610.c index ae6a671b7fd5..6ee01cb64ca5 100644 --- a/drivers/media/usb/dvb-usb-v2/au6610.c +++ b/drivers/media/usb/dvb-usb-v2/au6610.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "au6610.h" diff --git a/drivers/media/usb/dvb-usb-v2/au6610.h b/drivers/media/usb/dvb-usb-v2/au6610.h index ea337bfc00b1..aacfcc6fa0f5 100644 --- a/drivers/media/usb/dvb-usb-v2/au6610.h +++ b/drivers/media/usb/dvb-usb-v2/au6610.h @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef AU6610_H diff --git a/drivers/media/usb/dvb-usb-v2/ce6230.c b/drivers/media/usb/dvb-usb-v2/ce6230.c index f67b14bc32e3..e596031a708d 100644 --- a/drivers/media/usb/dvb-usb-v2/ce6230.c +++ b/drivers/media/usb/dvb-usb-v2/ce6230.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #include "ce6230.h" diff --git a/drivers/media/usb/dvb-usb-v2/ce6230.h b/drivers/media/usb/dvb-usb-v2/ce6230.h index 299e57e3390b..b25b3b938e49 100644 --- a/drivers/media/usb/dvb-usb-v2/ce6230.h +++ b/drivers/media/usb/dvb-usb-v2/ce6230.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #ifndef CE6230_H diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c index 0636eac37bbb..5730760e4e93 100644 --- a/drivers/media/usb/dvb-usb-v2/dvbsky.c +++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "dvb_usb.h" diff --git a/drivers/media/usb/dvb-usb-v2/ec168.c b/drivers/media/usb/dvb-usb-v2/ec168.c index 0c2b377704ff..1db8aeef3655 100644 --- a/drivers/media/usb/dvb-usb-v2/ec168.c +++ b/drivers/media/usb/dvb-usb-v2/ec168.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #include "ec168.h" diff --git a/drivers/media/usb/dvb-usb-v2/ec168.h b/drivers/media/usb/dvb-usb-v2/ec168.h index 615a6569421f..704955bcaa10 100644 --- a/drivers/media/usb/dvb-usb-v2/ec168.h +++ b/drivers/media/usb/dvb-usb-v2/ec168.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #ifndef EC168_H diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 5fea02672685..c2aff953cd7a 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -48,10 +48,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * * see Documentation/dvb/README.dvb-usb for more information * diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-demod.c b/drivers/media/usb/dvb-usb-v2/mxl111sf-demod.c index 639e156e0c1b..f0ed37da73d4 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-demod.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-demod.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "mxl111sf-demod.h" diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-demod.h b/drivers/media/usb/dvb-usb-v2/mxl111sf-demod.h index e6eae9d88e9f..9cb4972ce7a3 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-demod.h +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-demod.h @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __MXL111SF_DEMOD_H__ diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c b/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c index 2180c13a6dcc..c66861c9342b 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "mxl111sf-gpio.h" diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.h b/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.h index 16fa4d4daf88..af2c7bc8f301 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.h +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.h @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _DVB_USB_MXL111SF_GPIO_H_ diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c b/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c index 6427137a09ef..ffb49c28b15a 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "mxl111sf-i2c.h" diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.h b/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.h index c486fe02f018..28877c7a8175 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.h +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.h @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _DVB_USB_MXL111SF_I2C_H_ diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c index 5b0191178f9f..ffb6e7c72f57 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "mxl111sf-phy.h" diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.h b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.h index 25aa4a1ea755..0a61e8a56584 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.h +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.h @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _DVB_USB_MXL111SF_PHY_H_ diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-reg.h b/drivers/media/usb/dvb-usb-v2/mxl111sf-reg.h index 1f4bfbcdbabb..ad3f806dcc7a 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-reg.h +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-reg.h @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _DVB_USB_MXL111SF_REG_H_ diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c b/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c index f84bef6034dc..240d736bf1bb 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "mxl111sf-tuner.h" diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.h b/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.h index e96d9a444ed1..11ea07a73271 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.h +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.h @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __MXL111SF_TUNER_H__ diff --git a/drivers/media/usb/dvb-usb/af9005-fe.c b/drivers/media/usb/dvb-usb/af9005-fe.c index 9862d3e6b8e8..544bdf18fb2f 100644 --- a/drivers/media/usb/dvb-usb/af9005-fe.c +++ b/drivers/media/usb/dvb-usb/af9005-fe.c @@ -15,10 +15,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * see Documentation/dvb/README.dvb-usb for more information */ #include "af9005.h" diff --git a/drivers/media/usb/dvb-usb/af9005-remote.c b/drivers/media/usb/dvb-usb/af9005-remote.c index 7e3961d0db6b..9b29ffa93075 100644 --- a/drivers/media/usb/dvb-usb/af9005-remote.c +++ b/drivers/media/usb/dvb-usb/af9005-remote.c @@ -17,10 +17,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * see Documentation/dvb/README.dvb-usb for more information */ #include "af9005.h" diff --git a/drivers/media/usb/dvb-usb/af9005.c b/drivers/media/usb/dvb-usb/af9005.c index f5f476841aea..986763b1b2b3 100644 --- a/drivers/media/usb/dvb-usb/af9005.c +++ b/drivers/media/usb/dvb-usb/af9005.c @@ -15,10 +15,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * see Documentation/dvb/README.dvb-usb for more information */ #include "af9005.h" diff --git a/drivers/media/usb/dvb-usb/af9005.h b/drivers/media/usb/dvb-usb/af9005.h index 6a2bf3de8456..a1eae0fa02ed 100644 --- a/drivers/media/usb/dvb-usb/af9005.h +++ b/drivers/media/usb/dvb-usb/af9005.h @@ -15,10 +15,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * see Documentation/dvb/README.dvb-usb for more information */ #ifndef _DVB_USB_AF9005_H_ diff --git a/drivers/media/usb/dvb-usb/cinergyT2-core.c b/drivers/media/usb/dvb-usb/cinergyT2-core.c index 6404205560eb..6131aa7914a9 100644 --- a/drivers/media/usb/dvb-usb/cinergyT2-core.c +++ b/drivers/media/usb/dvb-usb/cinergyT2-core.c @@ -21,10 +21,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #include "cinergyT2.h" diff --git a/drivers/media/usb/dvb-usb/cinergyT2-fe.c b/drivers/media/usb/dvb-usb/cinergyT2-fe.c index bbb10fab65bc..f9772ad0a2a5 100644 --- a/drivers/media/usb/dvb-usb/cinergyT2-fe.c +++ b/drivers/media/usb/dvb-usb/cinergyT2-fe.c @@ -21,10 +21,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #include "cinergyT2.h" diff --git a/drivers/media/usb/dvb-usb/cinergyT2.h b/drivers/media/usb/dvb-usb/cinergyT2.h index 84efe03771eb..c04b819be160 100644 --- a/drivers/media/usb/dvb-usb/cinergyT2.h +++ b/drivers/media/usb/dvb-usb/cinergyT2.h @@ -21,10 +21,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #ifndef _DVB_USB_CINERGYT2_H_ diff --git a/drivers/media/usb/dvb-usb/dtv5100.c b/drivers/media/usb/dvb-usb/dtv5100.c index c60fb54f445f..2fa2abd3e726 100644 --- a/drivers/media/usb/dvb-usb/dtv5100.c +++ b/drivers/media/usb/dvb-usb/dtv5100.c @@ -15,10 +15,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "dtv5100.h" diff --git a/drivers/media/usb/dvb-usb/dtv5100.h b/drivers/media/usb/dvb-usb/dtv5100.h index 93e96e04a82a..1ab1eafd3187 100644 --- a/drivers/media/usb/dvb-usb/dtv5100.h +++ b/drivers/media/usb/dvb-usb/dtv5100.h @@ -13,10 +13,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _DVB_USB_DTV5100_H_ diff --git a/drivers/media/usb/dvb-usb/technisat-usb2.c b/drivers/media/usb/dvb-usb/technisat-usb2.c index 02c3bee6f83b..134e7436d56b 100644 --- a/drivers/media/usb/dvb-usb/technisat-usb2.c +++ b/drivers/media/usb/dvb-usb/technisat-usb2.c @@ -14,10 +14,6 @@ * License, or (at your option) any later version. * * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * THIS PROGRAM IS PROVIDED "AS IS" AND BOTH THE COPYRIGHT HOLDER AND * TECHNISAT DIGITAL UK LTD DISCLAIM ALL WARRANTIES WITH REGARD TO * THIS PROGRAM INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY OR diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c index 7969ddb9e2dd..ffad7f1af166 100644 --- a/drivers/media/usb/em28xx/em28xx-audio.c +++ b/drivers/media/usb/em28xx/em28xx-audio.c @@ -19,10 +19,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "em28xx.h" diff --git a/drivers/media/usb/gspca/autogain_functions.c b/drivers/media/usb/gspca/autogain_functions.c index 0e9ee8b50bb7..427db745e027 100644 --- a/drivers/media/usb/gspca/autogain_functions.c +++ b/drivers/media/usb/gspca/autogain_functions.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "gspca.h" diff --git a/drivers/media/usb/gspca/benq.c b/drivers/media/usb/gspca/benq.c index 5fa67b78ad49..60a728203b3b 100644 --- a/drivers/media/usb/gspca/benq.c +++ b/drivers/media/usb/gspca/benq.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/conex.c b/drivers/media/usb/gspca/conex.c index 2e15c80d6e3d..bdcdf7999c56 100644 --- a/drivers/media/usb/gspca/conex.c +++ b/drivers/media/usb/gspca/conex.c @@ -13,10 +13,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c index 52b88e9e656b..23d3285f182a 100644 --- a/drivers/media/usb/gspca/cpia1.c +++ b/drivers/media/usb/gspca/cpia1.c @@ -20,10 +20,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/etoms.c b/drivers/media/usb/gspca/etoms.c index 26c9ee1f1045..8f84292936e9 100644 --- a/drivers/media/usb/gspca/etoms.c +++ b/drivers/media/usb/gspca/etoms.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/finepix.c b/drivers/media/usb/gspca/finepix.c index ae9a55d7bbbb..7bb469aa61a7 100644 --- a/drivers/media/usb/gspca/finepix.c +++ b/drivers/media/usb/gspca/finepix.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index fa2cbb981905..16bc1dde2c8c 100644 --- a/drivers/media/usb/gspca/gspca.c +++ b/drivers/media/usb/gspca/gspca.c @@ -15,10 +15,6 @@ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/jeilinj.c b/drivers/media/usb/gspca/jeilinj.c index 19736e237b37..34e043b7d1bc 100644 --- a/drivers/media/usb/gspca/jeilinj.c +++ b/drivers/media/usb/gspca/jeilinj.c @@ -18,10 +18,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/jl2005bcd.c b/drivers/media/usb/gspca/jl2005bcd.c index b12ecb72df4c..17c7a953564c 100644 --- a/drivers/media/usb/gspca/jl2005bcd.c +++ b/drivers/media/usb/gspca/jl2005bcd.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define MODULE_NAME "jl2005bcd" diff --git a/drivers/media/usb/gspca/jpeg.h b/drivers/media/usb/gspca/jpeg.h index 0aa2b671faa4..d5ad7c96d039 100644 --- a/drivers/media/usb/gspca/jpeg.h +++ b/drivers/media/usb/gspca/jpeg.h @@ -18,10 +18,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ /* diff --git a/drivers/media/usb/gspca/kinect.c b/drivers/media/usb/gspca/kinect.c index 3cb30a37d6ac..2f28b38c5479 100644 --- a/drivers/media/usb/gspca/kinect.c +++ b/drivers/media/usb/gspca/kinect.c @@ -18,10 +18,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/konica.c b/drivers/media/usb/gspca/konica.c index 40aaaa9c5f30..71f273377f83 100644 --- a/drivers/media/usb/gspca/konica.c +++ b/drivers/media/usb/gspca/konica.c @@ -22,10 +22,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/mars.c b/drivers/media/usb/gspca/mars.c index 779a8785f421..25df55e840c7 100644 --- a/drivers/media/usb/gspca/mars.c +++ b/drivers/media/usb/gspca/mars.c @@ -13,10 +13,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/mr97310a.c b/drivers/media/usb/gspca/mr97310a.c index 6dfb364094ec..8b0e32a649ac 100644 --- a/drivers/media/usb/gspca/mr97310a.c +++ b/drivers/media/usb/gspca/mr97310a.c @@ -34,10 +34,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/nw80x.c b/drivers/media/usb/gspca/nw80x.c index 599f755e75b8..5d2d0bcb038d 100644 --- a/drivers/media/usb/gspca/nw80x.c +++ b/drivers/media/usb/gspca/nw80x.c @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/ov519.c b/drivers/media/usb/gspca/ov519.c index 4dbca54cf2a8..f4c41f043cda 100644 --- a/drivers/media/usb/gspca/ov519.c +++ b/drivers/media/usb/gspca/ov519.c @@ -31,10 +31,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/ov534.c b/drivers/media/usb/gspca/ov534.c index 9266a5c9abc5..32849ff86b09 100644 --- a/drivers/media/usb/gspca/ov534.c +++ b/drivers/media/usb/gspca/ov534.c @@ -24,10 +24,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/ov534_9.c b/drivers/media/usb/gspca/ov534_9.c index 47085cf2d723..b2a92e518118 100644 --- a/drivers/media/usb/gspca/ov534_9.c +++ b/drivers/media/usb/gspca/ov534_9.c @@ -18,10 +18,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/pac207.c b/drivers/media/usb/gspca/pac207.c index 51e11248bbb8..01c185d367e5 100644 --- a/drivers/media/usb/gspca/pac207.c +++ b/drivers/media/usb/gspca/pac207.c @@ -17,10 +17,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/pac7302.c b/drivers/media/usb/gspca/pac7302.c index be07a24c4518..595535e143e6 100644 --- a/drivers/media/usb/gspca/pac7302.c +++ b/drivers/media/usb/gspca/pac7302.c @@ -17,10 +17,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* diff --git a/drivers/media/usb/gspca/pac7311.c b/drivers/media/usb/gspca/pac7311.c index 25f86b1e74a8..8bac2d9326bf 100644 --- a/drivers/media/usb/gspca/pac7311.c +++ b/drivers/media/usb/gspca/pac7311.c @@ -13,10 +13,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Some documentation about various registers as determined by trial and error. diff --git a/drivers/media/usb/gspca/pac_common.h b/drivers/media/usb/gspca/pac_common.h index fbc5e226c3e4..4047bcb6c2b5 100644 --- a/drivers/media/usb/gspca/pac_common.h +++ b/drivers/media/usb/gspca/pac_common.h @@ -17,10 +17,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ /* We calculate the autogain at the end of the transfer of a frame, at this diff --git a/drivers/media/usb/gspca/se401.c b/drivers/media/usb/gspca/se401.c index 5102cea50471..477da0664b7d 100644 --- a/drivers/media/usb/gspca/se401.c +++ b/drivers/media/usb/gspca/se401.c @@ -17,10 +17,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/se401.h b/drivers/media/usb/gspca/se401.h index 96d8ebf3cf59..7cc0728c1410 100644 --- a/drivers/media/usb/gspca/se401.h +++ b/drivers/media/usb/gspca/se401.h @@ -17,10 +17,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define SE401_REQ_GET_CAMERA_DESCRIPTOR 0x06 diff --git a/drivers/media/usb/gspca/sn9c2028.c b/drivers/media/usb/gspca/sn9c2028.c index 4f2050a5ec94..5d32dd359d84 100644 --- a/drivers/media/usb/gspca/sn9c2028.c +++ b/drivers/media/usb/gspca/sn9c2028.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/sn9c2028.h b/drivers/media/usb/gspca/sn9c2028.h index f85bc106bc52..85761aa7c8b2 100644 --- a/drivers/media/usb/gspca/sn9c2028.h +++ b/drivers/media/usb/gspca/sn9c2028.h @@ -15,10 +15,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ static const unsigned char sn9c2028_sof_marker[] = { diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c index e7430b06526a..c605f78d6186 100644 --- a/drivers/media/usb/gspca/sn9c20x.c +++ b/drivers/media/usb/gspca/sn9c20x.c @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/sonixb.c b/drivers/media/usb/gspca/sonixb.c index 6696b2ec34e9..5f3f2979540a 100644 --- a/drivers/media/usb/gspca/sonixb.c +++ b/drivers/media/usb/gspca/sonixb.c @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Some documentation on known sonixb registers: diff --git a/drivers/media/usb/gspca/sonixj.c b/drivers/media/usb/gspca/sonixj.c index d49d76ec1421..5eeaf16ac5e8 100644 --- a/drivers/media/usb/gspca/sonixj.c +++ b/drivers/media/usb/gspca/sonixj.c @@ -13,10 +13,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/spca1528.c b/drivers/media/usb/gspca/spca1528.c index f38fd8949609..327ec901abe1 100644 --- a/drivers/media/usb/gspca/spca1528.c +++ b/drivers/media/usb/gspca/spca1528.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/spca500.c b/drivers/media/usb/gspca/spca500.c index f011a309dd65..da2d9027914c 100644 --- a/drivers/media/usb/gspca/spca500.c +++ b/drivers/media/usb/gspca/spca500.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/spca501.c b/drivers/media/usb/gspca/spca501.c index d92fd17d6701..ae5a80987553 100644 --- a/drivers/media/usb/gspca/spca501.c +++ b/drivers/media/usb/gspca/spca501.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/spca505.c b/drivers/media/usb/gspca/spca505.c index 232b330d2dd3..1553cc766c04 100644 --- a/drivers/media/usb/gspca/spca505.c +++ b/drivers/media/usb/gspca/spca505.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/spca506.c b/drivers/media/usb/gspca/spca506.c index ee84863d27d4..843c93f5acf3 100644 --- a/drivers/media/usb/gspca/spca506.c +++ b/drivers/media/usb/gspca/spca506.c @@ -15,10 +15,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define MODULE_NAME "spca506" diff --git a/drivers/media/usb/gspca/spca508.c b/drivers/media/usb/gspca/spca508.c index 75f2beb2ea5a..1e0ba6b24e21 100644 --- a/drivers/media/usb/gspca/spca508.c +++ b/drivers/media/usb/gspca/spca508.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/spca561.c b/drivers/media/usb/gspca/spca561.c index 403d71cd65d9..4ff704cf9ed6 100644 --- a/drivers/media/usb/gspca/spca561.c +++ b/drivers/media/usb/gspca/spca561.c @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/sq905.c b/drivers/media/usb/gspca/sq905.c index 9424c33f0ddb..f1da34a10ce8 100644 --- a/drivers/media/usb/gspca/sq905.c +++ b/drivers/media/usb/gspca/sq905.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* diff --git a/drivers/media/usb/gspca/sq905c.c b/drivers/media/usb/gspca/sq905c.c index 6c45dcc44eb0..8b4e4948a0cb 100644 --- a/drivers/media/usb/gspca/sq905c.c +++ b/drivers/media/usb/gspca/sq905c.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* diff --git a/drivers/media/usb/gspca/sq930x.c b/drivers/media/usb/gspca/sq930x.c index e274cf19a3ea..aa9a9411b801 100644 --- a/drivers/media/usb/gspca/sq930x.c +++ b/drivers/media/usb/gspca/sq930x.c @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/stk014.c b/drivers/media/usb/gspca/stk014.c index d324d001e114..daf45db6c404 100644 --- a/drivers/media/usb/gspca/stk014.c +++ b/drivers/media/usb/gspca/stk014.c @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/stk1135.c b/drivers/media/usb/gspca/stk1135.c index 48234c9a8b6c..3ab5ec2ca4bd 100644 --- a/drivers/media/usb/gspca/stk1135.c +++ b/drivers/media/usb/gspca/stk1135.c @@ -15,10 +15,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/stk1135.h b/drivers/media/usb/gspca/stk1135.h index e1dd92ab49bb..bd144012f73a 100644 --- a/drivers/media/usb/gspca/stk1135.h +++ b/drivers/media/usb/gspca/stk1135.h @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define STK1135_REG_GCTRL 0x000 /* GPIO control */ diff --git a/drivers/media/usb/gspca/stv0680.c b/drivers/media/usb/gspca/stv0680.c index 7f94ec74282e..29a65d05cbb2 100644 --- a/drivers/media/usb/gspca/stv0680.c +++ b/drivers/media/usb/gspca/stv0680.c @@ -21,10 +21,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx.c b/drivers/media/usb/gspca/stv06xx/stv06xx.c index fef7a784b879..e72c3e1ab9ff 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx.c +++ b/drivers/media/usb/gspca/stv06xx/stv06xx.c @@ -14,10 +14,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * P/N 861037: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx.h b/drivers/media/usb/gspca/stv06xx/stv06xx.h index 34957a4ec150..f9d74e4d7cf9 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx.h +++ b/drivers/media/usb/gspca/stv06xx/stv06xx.h @@ -14,10 +14,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * P/N 861037: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c b/drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c index 2220b70d47e6..28252f6c4afd 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c +++ b/drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c @@ -15,10 +15,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * P/N 861037: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h b/drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h index 1ba9158d0102..d2da0de05236 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h +++ b/drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.h @@ -15,10 +15,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * P/N 861037: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c index 8d785edcccf2..e1ce96e9405f 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c +++ b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c @@ -14,10 +14,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * P/N 861037: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h index 5071e5353fd3..33572d8bb368 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h +++ b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.h @@ -14,10 +14,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * P/N 861037: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h b/drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h index 3a498c2495c6..747d07c877fe 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h +++ b/drivers/media/usb/gspca/stv06xx/stv06xx_sensor.h @@ -14,10 +14,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * P/N 861037: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c b/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c index 515a9e121653..4b76070515b5 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c +++ b/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.c @@ -20,10 +20,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h b/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h index 8f20fbf30f33..87324a69a0be 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h +++ b/drivers/media/usb/gspca/stv06xx/stv06xx_st6422.h @@ -20,10 +20,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef STV06XX_ST6422_H_ diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c index f86cec091bf4..9f490f55d367 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c +++ b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c @@ -14,10 +14,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * P/N 861037: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h index 53e67b40ca05..e8598893791e 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h +++ b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.h @@ -14,10 +14,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * P/N 861037: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express diff --git a/drivers/media/usb/gspca/sunplus.c b/drivers/media/usb/gspca/sunplus.c index 38dc9e7aa313..8c2785aea3cd 100644 --- a/drivers/media/usb/gspca/sunplus.c +++ b/drivers/media/usb/gspca/sunplus.c @@ -13,10 +13,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/t613.c b/drivers/media/usb/gspca/t613.c index bb52fc1fe598..42667710af92 100644 --- a/drivers/media/usb/gspca/t613.c +++ b/drivers/media/usb/gspca/t613.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * *Notes: * t613 + tas5130A * * Focus to light do not balance well as in win. * Quality in win is not good, but its kinda better. diff --git a/drivers/media/usb/gspca/tv8532.c b/drivers/media/usb/gspca/tv8532.c index d497ba38af0d..bc2720e9cc4f 100644 --- a/drivers/media/usb/gspca/tv8532.c +++ b/drivers/media/usb/gspca/tv8532.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define MODULE_NAME "tv8532" diff --git a/drivers/media/usb/gspca/vc032x.c b/drivers/media/usb/gspca/vc032x.c index b4efb2fb36fa..b935febf7146 100644 --- a/drivers/media/usb/gspca/vc032x.c +++ b/drivers/media/usb/gspca/vc032x.c @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/vicam.c b/drivers/media/usb/gspca/vicam.c index 8860510c2f9c..554b90ef2200 100644 --- a/drivers/media/usb/gspca/vicam.c +++ b/drivers/media/usb/gspca/vicam.c @@ -20,10 +20,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/w996Xcf.c b/drivers/media/usb/gspca/w996Xcf.c index 896f1b2b9179..728d2322c433 100644 --- a/drivers/media/usb/gspca/w996Xcf.c +++ b/drivers/media/usb/gspca/w996Xcf.c @@ -18,10 +18,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ /* Note this is not a stand alone driver, it gets included in ov519.c, this diff --git a/drivers/media/usb/gspca/xirlink_cit.c b/drivers/media/usb/gspca/xirlink_cit.c index d5ed9d36ce25..b600ea6460d3 100644 --- a/drivers/media/usb/gspca/xirlink_cit.c +++ b/drivers/media/usb/gspca/xirlink_cit.c @@ -21,10 +21,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/gspca/zc3xx.c b/drivers/media/usb/gspca/zc3xx.c index d5d8c7e81762..e2d486bd8c28 100644 --- a/drivers/media/usb/gspca/zc3xx.c +++ b/drivers/media/usb/gspca/zc3xx.c @@ -13,10 +13,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/media/usb/pvrusb2/pvrusb2-audio.c b/drivers/media/usb/pvrusb2/pvrusb2-audio.c index 3bac50a248d4..356afa250cd6 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-audio.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-audio.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "pvrusb2-audio.h" diff --git a/drivers/media/usb/pvrusb2/pvrusb2-audio.h b/drivers/media/usb/pvrusb2/pvrusb2-audio.h index 27cefb5cb170..4f3898473165 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-audio.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-audio.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_AUDIO_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-context.c b/drivers/media/usb/pvrusb2/pvrusb2-context.c index c45f30715dcd..d9e8481e9e28 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-context.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-context.c @@ -11,10 +11,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "pvrusb2-context.h" diff --git a/drivers/media/usb/pvrusb2/pvrusb2-context.h b/drivers/media/usb/pvrusb2/pvrusb2-context.h index 1c1d442d9ea3..13e00c529611 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-context.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-context.h @@ -11,10 +11,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_CONTEXT_H #define __PVRUSB2_CONTEXT_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c index 7f29a0464f36..679f3ff3b0a5 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ /* diff --git a/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.h b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.h index 86c17bee56f9..90dfb8b3f3e5 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_CS53L32A_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-ctrl.c b/drivers/media/usb/pvrusb2/pvrusb2-ctrl.c index 958db170a048..5f4ba84e5557 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-ctrl.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-ctrl.c @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "pvrusb2-ctrl.h" diff --git a/drivers/media/usb/pvrusb2/pvrusb2-ctrl.h b/drivers/media/usb/pvrusb2/pvrusb2-ctrl.h index c175571868a3..4b9152e36fe4 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-ctrl.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-ctrl.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_CTRL_H #define __PVRUSB2_CTRL_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c index 30eef97ef2ef..242b213b7599 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ /* diff --git a/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h index 2eed7b7ee25e..dfddc88750d9 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_CX2584X_V4L_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-debug.h b/drivers/media/usb/pvrusb2/pvrusb2-debug.h index 4ef2ebcd97a5..5cd16292e2fa 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-debug.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-debug.h @@ -11,10 +11,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_DEBUG_H #define __PVRUSB2_DEBUG_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c b/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c index 58ec706ebdb3..d3f3bd96885f 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-debugifc.c @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include diff --git a/drivers/media/usb/pvrusb2/pvrusb2-debugifc.h b/drivers/media/usb/pvrusb2/pvrusb2-debugifc.h index a8dfc55f136f..fcaaa8dd68b8 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-debugifc.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-debugifc.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_DEBUGIFC_H #define __PVRUSB2_DEBUGIFC_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-devattr.c b/drivers/media/usb/pvrusb2/pvrusb2-devattr.c index 06c4c3dabcde..51b3312eaea1 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-devattr.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-devattr.c @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ /* diff --git a/drivers/media/usb/pvrusb2/pvrusb2-devattr.h b/drivers/media/usb/pvrusb2/pvrusb2-devattr.h index 5aeefb6a991f..c1e7d4822cd1 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-devattr.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-devattr.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_DEVATTR_H #define __PVRUSB2_DEVATTR_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c index 8c95793433e7..56c750535ee7 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include diff --git a/drivers/media/usb/pvrusb2/pvrusb2-eeprom.c b/drivers/media/usb/pvrusb2/pvrusb2-eeprom.c index 276b17fb9aad..4af2fb5c85d5 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-eeprom.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-eeprom.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include diff --git a/drivers/media/usb/pvrusb2/pvrusb2-eeprom.h b/drivers/media/usb/pvrusb2/pvrusb2-eeprom.h index f1e33c807f46..1d81cac30f3d 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-eeprom.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-eeprom.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_EEPROM_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-encoder.c b/drivers/media/usb/pvrusb2/pvrusb2-encoder.c index f0483621d2a3..ca637074fa1f 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-encoder.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-encoder.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include // for linux/firmware.h diff --git a/drivers/media/usb/pvrusb2/pvrusb2-encoder.h b/drivers/media/usb/pvrusb2/pvrusb2-encoder.h index a2bfb48f1ecd..10d7f0b48264 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-encoder.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-encoder.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_ENCODER_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-fx2-cmd.h b/drivers/media/usb/pvrusb2/pvrusb2-fx2-cmd.h index 06a15a68bcfd..0a01de4e54db 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-fx2-cmd.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-fx2-cmd.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef _PVRUSB2_FX2_CMD_H_ diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h index 23473a21319c..7a824196d5fa 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_HDW_INTERNAL_H #define __PVRUSB2_HDW_INTERNAL_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c index e3ed8ffee9f7..ad5b25b89699 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.h b/drivers/media/usb/pvrusb2/pvrusb2-hdw.h index a82a00dd7329..25648add77e5 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_HDW_H #define __PVRUSB2_HDW_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c index cc63e5f4c26c..f727b54a53c6 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include diff --git a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.h b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.h index a10a3e8e9345..1c44dee7fd69 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_I2C_CORE_H #define __PVRUSB2_I2C_CORE_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-io.c b/drivers/media/usb/pvrusb2/pvrusb2-io.c index e3103ecd4828..2832ddffcc71 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-io.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-io.c @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "pvrusb2-io.h" diff --git a/drivers/media/usb/pvrusb2/pvrusb2-io.h b/drivers/media/usb/pvrusb2/pvrusb2-io.h index 0c47c6a95ab2..e769aeb9d529 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-io.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-io.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_IO_H #define __PVRUSB2_IO_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-ioread.c b/drivers/media/usb/pvrusb2/pvrusb2-ioread.c index 3c7ca2c2c108..602097bdcf14 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-ioread.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-ioread.c @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "pvrusb2-ioread.h" diff --git a/drivers/media/usb/pvrusb2/pvrusb2-ioread.h b/drivers/media/usb/pvrusb2/pvrusb2-ioread.h index 0b1f0fbc3438..5827ea09c5e3 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-ioread.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-ioread.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_IOREAD_H #define __PVRUSB2_IOREAD_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-main.c b/drivers/media/usb/pvrusb2/pvrusb2-main.c index 86be902a0049..cbe2c3a22458 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-main.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-main.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include diff --git a/drivers/media/usb/pvrusb2/pvrusb2-std.c b/drivers/media/usb/pvrusb2/pvrusb2-std.c index cd7bc18a1ba2..21bb20dba82c 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-std.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-std.c @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include "pvrusb2-std.h" diff --git a/drivers/media/usb/pvrusb2/pvrusb2-std.h b/drivers/media/usb/pvrusb2/pvrusb2-std.h index ed4ec0474429..b48304f41472 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-std.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-std.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_STD_H #define __PVRUSB2_STD_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c b/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c index d977976b8d91..7bc6d090358e 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include diff --git a/drivers/media/usb/pvrusb2/pvrusb2-sysfs.h b/drivers/media/usb/pvrusb2/pvrusb2-sysfs.h index 6f0579e1e07b..431f4fd19015 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-sysfs.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-sysfs.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_SYSFS_H #define __PVRUSB2_SYSFS_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-util.h b/drivers/media/usb/pvrusb2/pvrusb2-util.h index 5465bf9cd73e..b03ca3ef1ba0 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-util.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-util.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_UTIL_H #define __PVRUSB2_UTIL_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index bbbe18d5275a..88283d7229f0 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #include diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.h b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.h index e455c9515841..ec755ee8f86a 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.h @@ -12,10 +12,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_V4L2_H #define __PVRUSB2_V4L2_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c b/drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c index 6fee367139aa..b68aec2124b2 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ /* diff --git a/drivers/media/usb/pvrusb2/pvrusb2-video-v4l.h b/drivers/media/usb/pvrusb2/pvrusb2-video-v4l.h index dacf3ec7f9e1..fa33f20655f4 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-video-v4l.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-video-v4l.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_VIDEO_V4L_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2-wm8775.c b/drivers/media/usb/pvrusb2/pvrusb2-wm8775.c index 7993983de5a6..8f357f771ba7 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-wm8775.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-wm8775.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ /* diff --git a/drivers/media/usb/pvrusb2/pvrusb2-wm8775.h b/drivers/media/usb/pvrusb2/pvrusb2-wm8775.h index a4ee12e28d5c..c4ac7c2701d0 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-wm8775.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-wm8775.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_WM8775_H diff --git a/drivers/media/usb/pvrusb2/pvrusb2.h b/drivers/media/usb/pvrusb2/pvrusb2.h index 95f98a87abb3..955290ba2d54 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2.h +++ b/drivers/media/usb/pvrusb2/pvrusb2.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef __PVRUSB2_H diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index f7bb78c1873c..a9d4484f7626 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -30,10 +30,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/drivers/media/usb/stkwebcam/stk-sensor.c b/drivers/media/usb/stkwebcam/stk-sensor.c index fbccbb2eed9f..985af9933c7e 100644 --- a/drivers/media/usb/stkwebcam/stk-sensor.c +++ b/drivers/media/usb/stkwebcam/stk-sensor.c @@ -19,10 +19,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Controlling the sensor via the STK1125 vendor specific control interface: diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c index a212248bc2a3..6e7fc36b658f 100644 --- a/drivers/media/usb/stkwebcam/stk-webcam.c +++ b/drivers/media/usb/stkwebcam/stk-webcam.c @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include diff --git a/drivers/media/usb/stkwebcam/stk-webcam.h b/drivers/media/usb/stkwebcam/stk-webcam.h index 92bb48e3c74e..0284120ce246 100644 --- a/drivers/media/usb/stkwebcam/stk-webcam.h +++ b/drivers/media/usb/stkwebcam/stk-webcam.h @@ -13,10 +13,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef STKWEBCAM_H diff --git a/drivers/media/usb/tm6000/tm6000-cards.c b/drivers/media/usb/tm6000/tm6000-cards.c index 8902ee36bc94..b293dea6554f 100644 --- a/drivers/media/usb/tm6000/tm6000-cards.c +++ b/drivers/media/usb/tm6000/tm6000-cards.c @@ -11,10 +11,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/drivers/media/usb/tm6000/tm6000-core.c b/drivers/media/usb/tm6000/tm6000-core.c index 8d104e5c4be3..8c265bd80faa 100644 --- a/drivers/media/usb/tm6000/tm6000-core.c +++ b/drivers/media/usb/tm6000/tm6000-core.c @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/drivers/media/usb/tm6000/tm6000-dvb.c b/drivers/media/usb/tm6000/tm6000-dvb.c index 70dbaec1219e..097ac321b7e1 100644 --- a/drivers/media/usb/tm6000/tm6000-dvb.c +++ b/drivers/media/usb/tm6000/tm6000-dvb.c @@ -11,10 +11,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/drivers/media/usb/tm6000/tm6000-i2c.c b/drivers/media/usb/tm6000/tm6000-i2c.c index b01d3ee56e77..cbcc1472f1c7 100644 --- a/drivers/media/usb/tm6000/tm6000-i2c.c +++ b/drivers/media/usb/tm6000/tm6000-i2c.c @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/drivers/media/usb/tm6000/tm6000-input.c b/drivers/media/usb/tm6000/tm6000-input.c index 26b2ebb62547..83d59456680a 100644 --- a/drivers/media/usb/tm6000/tm6000-input.c +++ b/drivers/media/usb/tm6000/tm6000-input.c @@ -11,10 +11,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/drivers/media/usb/tm6000/tm6000-regs.h b/drivers/media/usb/tm6000/tm6000-regs.h index a38c251ed57b..ab3fb74c476c 100644 --- a/drivers/media/usb/tm6000/tm6000-regs.h +++ b/drivers/media/usb/tm6000/tm6000-regs.h @@ -11,10 +11,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* diff --git a/drivers/media/usb/tm6000/tm6000-stds.c b/drivers/media/usb/tm6000/tm6000-stds.c index 4064a5e8fae1..aa43810d17f9 100644 --- a/drivers/media/usb/tm6000/tm6000-stds.c +++ b/drivers/media/usb/tm6000/tm6000-stds.c @@ -11,10 +11,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/drivers/media/usb/tm6000/tm6000-usb-isoc.h b/drivers/media/usb/tm6000/tm6000-usb-isoc.h index 99d15a55aa03..6a13a27c55d7 100644 --- a/drivers/media/usb/tm6000/tm6000-usb-isoc.h +++ b/drivers/media/usb/tm6000/tm6000-usb-isoc.h @@ -11,10 +11,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index d9f3fa5db8dd..3367a3b72530 100644 --- a/drivers/media/usb/tm6000/tm6000-video.c +++ b/drivers/media/usb/tm6000/tm6000-video.c @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/drivers/media/usb/tm6000/tm6000.h b/drivers/media/usb/tm6000/tm6000.h index f2127944776f..7ec478d75f55 100644 --- a/drivers/media/usb/tm6000/tm6000.h +++ b/drivers/media/usb/tm6000/tm6000.h @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c index fc0219f1b7df..01c7e6d4481c 100644 --- a/drivers/media/usb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c @@ -14,10 +14,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #include diff --git a/drivers/media/usb/ttusb-dec/ttusbdecfe.c b/drivers/media/usb/ttusb-dec/ttusbdecfe.c index 2d9444905fdb..09693caa15e2 100644 --- a/drivers/media/usb/ttusb-dec/ttusbdecfe.c +++ b/drivers/media/usb/ttusb-dec/ttusbdecfe.c @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #include "dvb_frontend.h" diff --git a/drivers/media/usb/ttusb-dec/ttusbdecfe.h b/drivers/media/usb/ttusb-dec/ttusbdecfe.h index 15ccc3d1a20e..5aff58c1b075 100644 --- a/drivers/media/usb/ttusb-dec/ttusbdecfe.h +++ b/drivers/media/usb/ttusb-dec/ttusbdecfe.h @@ -13,10 +13,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #ifndef TTUSBDECFE_H diff --git a/drivers/media/usb/usbvision/usbvision-cards.c b/drivers/media/usb/usbvision/usbvision-cards.c index 3103d0d020e8..fc2418b9f37c 100644 --- a/drivers/media/usb/usbvision/usbvision-cards.c +++ b/drivers/media/usb/usbvision/usbvision-cards.c @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ diff --git a/drivers/media/usb/usbvision/usbvision-core.c b/drivers/media/usb/usbvision/usbvision-core.c index bf041a9e69db..0af713066825 100644 --- a/drivers/media/usb/usbvision/usbvision-core.c +++ b/drivers/media/usb/usbvision/usbvision-core.c @@ -17,10 +17,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/drivers/media/usb/usbvision/usbvision-i2c.c b/drivers/media/usb/usbvision/usbvision-i2c.c index 120de2e020e1..5a3f788ad033 100644 --- a/drivers/media/usb/usbvision/usbvision-i2c.c +++ b/drivers/media/usb/usbvision/usbvision-i2c.c @@ -17,10 +17,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c index a7529196c327..b88fed38a3e5 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c @@ -17,10 +17,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * * Let's call the version 0.... until compression decoding is completely * implemented. * diff --git a/drivers/media/usb/usbvision/usbvision.h b/drivers/media/usb/usbvision/usbvision.h index 4f2e4fde38f2..56a28d651930 100644 --- a/drivers/media/usb/usbvision/usbvision.h +++ b/drivers/media/usb/usbvision/usbvision.h @@ -21,10 +21,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ diff --git a/drivers/media/usb/zr364xx/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c index 3950708cbb32..f2d6fc03dda0 100644 --- a/drivers/media/usb/zr364xx/zr364xx.c +++ b/drivers/media/usb/zr364xx/zr364xx.c @@ -21,10 +21,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -- cgit v1.2.3-55-g7522 From 20b852273642f41ce5c97601acb89185cbcee772 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Mon, 21 Nov 2016 14:48:30 -0200 Subject: [media] media: Rename graph and pipeline structs and functions The media_entity_pipeline_start() and media_entity_pipeline_stop() functions are renamed as media_pipeline_start() and media_pipeline_stop(), respectively. The reason is two-fold: the pipeline struct is, rightly, already called media_pipeline (rather than media_entity_pipeline) and what this really is about is a pipeline. A pipeline consists of entities --- and, well, other objects embedded in these entities. As the pipeline object will be in the future moved from entities to pads in order to support multiple pipelines through a single entity, do the renaming now. Similarly, functions operating on struct media_entity_graph as well as the struct itself are renamed by dropping the "entity_" part from the prefix of the function family and the data structure. The graph traversal which is what the functions are about is not specifically about entities only and will operate on pads for the same reason as the media pipeline. The patch has been generated using the following command: git grep -l media_entity |xargs perl -i -pe ' s/media_entity_pipeline/media_pipeline/g; s/media_entity_graph/media_graph/g' And a few manual edits related to line start alignment and line wrapping. Signed-off-by: Sakari Ailus Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/kapi/mc-core.rst | 18 ++--- drivers/media/media-device.c | 8 +-- drivers/media/media-entity.c | 77 +++++++++++----------- drivers/media/platform/exynos4-is/fimc-capture.c | 8 +-- drivers/media/platform/exynos4-is/fimc-isp-video.c | 8 +-- drivers/media/platform/exynos4-is/fimc-lite.c | 8 +-- drivers/media/platform/exynos4-is/media-dev.c | 16 ++--- drivers/media/platform/exynos4-is/media-dev.h | 2 +- drivers/media/platform/omap3isp/ispvideo.c | 16 ++--- drivers/media/platform/s3c-camif/camif-capture.c | 6 +- drivers/media/platform/vsp1/vsp1_drm.c | 4 +- drivers/media/platform/vsp1/vsp1_video.c | 16 ++--- drivers/media/platform/xilinx/xilinx-dma.c | 16 ++--- drivers/media/usb/au0828/au0828-core.c | 4 +- drivers/media/v4l2-core/v4l2-mc.c | 18 ++--- drivers/staging/media/davinci_vpfe/vpfe_video.c | 25 ++++--- drivers/staging/media/davinci_vpfe/vpfe_video.h | 2 +- drivers/staging/media/omap4iss/iss_video.c | 32 ++++----- include/media/media-device.h | 2 +- include/media/media-entity.h | 65 +++++++++--------- 20 files changed, 174 insertions(+), 177 deletions(-) (limited to 'drivers/media/usb') diff --git a/Documentation/media/kapi/mc-core.rst b/Documentation/media/kapi/mc-core.rst index 1a738e5f6056..0c05503eaf1f 100644 --- a/Documentation/media/kapi/mc-core.rst +++ b/Documentation/media/kapi/mc-core.rst @@ -162,13 +162,13 @@ framework provides a depth-first graph traversal API for that purpose. currently defined as 16. Drivers initiate a graph traversal by calling -:c:func:`media_entity_graph_walk_start()` +:c:func:`media_graph_walk_start()` The graph structure, provided by the caller, is initialized to start graph traversal at the given entity. Drivers can then retrieve the next entity by calling -:c:func:`media_entity_graph_walk_next()` +:c:func:`media_graph_walk_next()` When the graph traversal is complete the function will return ``NULL``. @@ -206,7 +206,7 @@ Pipelines and media streams When starting streaming, drivers must notify all entities in the pipeline to prevent link states from being modified during streaming by calling -:c:func:`media_entity_pipeline_start()`. +:c:func:`media_pipeline_start()`. The function will mark all entities connected to the given entity through enabled links, either directly or indirectly, as streaming. @@ -218,17 +218,17 @@ in higher-level pipeline structures and can then access the pipeline through the struct :c:type:`media_entity` pipe field. -Calls to :c:func:`media_entity_pipeline_start()` can be nested. +Calls to :c:func:`media_pipeline_start()` can be nested. The pipeline pointer must be identical for all nested calls to the function. -:c:func:`media_entity_pipeline_start()` may return an error. In that case, +:c:func:`media_pipeline_start()` may return an error. In that case, it will clean up any of the changes it did by itself. When stopping the stream, drivers must notify the entities with -:c:func:`media_entity_pipeline_stop()`. +:c:func:`media_pipeline_stop()`. -If multiple calls to :c:func:`media_entity_pipeline_start()` have been -made the same number of :c:func:`media_entity_pipeline_stop()` calls +If multiple calls to :c:func:`media_pipeline_start()` have been +made the same number of :c:func:`media_pipeline_stop()` calls are required to stop streaming. The :c:type:`media_entity`.\ ``pipe`` field is reset to ``NULL`` on the last nested stop call. @@ -245,7 +245,7 @@ operation must be done with the media_device graph_mutex held. Link validation ^^^^^^^^^^^^^^^ -Link validation is performed by :c:func:`media_entity_pipeline_start()` +Link validation is performed by :c:func:`media_pipeline_start()` for any entity which has sink pads in the pipeline. The :c:type:`media_entity`.\ ``link_validate()`` callback is used for that purpose. In ``link_validate()`` callback, entity driver should check diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 8495ac913df3..760e3e424e23 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -597,19 +597,19 @@ int __must_check media_device_register_entity(struct media_device *mdev, if (mdev->entity_internal_idx_max >= mdev->pm_count_walk.ent_enum.idx_max) { - struct media_entity_graph new = { .top = 0 }; + struct media_graph new = { .top = 0 }; /* * Initialise the new graph walk before cleaning up * the old one in order not to spoil the graph walk * object of the media device if graph walk init fails. */ - ret = media_entity_graph_walk_init(&new, mdev); + ret = media_graph_walk_init(&new, mdev); if (ret) { mutex_unlock(&mdev->graph_mutex); return ret; } - media_entity_graph_walk_cleanup(&mdev->pm_count_walk); + media_graph_walk_cleanup(&mdev->pm_count_walk); mdev->pm_count_walk = new; } mutex_unlock(&mdev->graph_mutex); @@ -691,7 +691,7 @@ void media_device_cleanup(struct media_device *mdev) { ida_destroy(&mdev->entity_internal_idx); mdev->entity_internal_idx_max = 0; - media_entity_graph_walk_cleanup(&mdev->pm_count_walk); + media_graph_walk_cleanup(&mdev->pm_count_walk); mutex_destroy(&mdev->graph_mutex); } EXPORT_SYMBOL_GPL(media_device_cleanup); diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index d37260850e98..256b590fcfcd 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c @@ -254,7 +254,7 @@ media_entity_other(struct media_entity *entity, struct media_link *link) } /* push an entity to traversal stack */ -static void stack_push(struct media_entity_graph *graph, +static void stack_push(struct media_graph *graph, struct media_entity *entity) { if (graph->top == MEDIA_ENTITY_ENUM_MAX_DEPTH - 1) { @@ -266,7 +266,7 @@ static void stack_push(struct media_entity_graph *graph, graph->stack[graph->top].entity = entity; } -static struct media_entity *stack_pop(struct media_entity_graph *graph) +static struct media_entity *stack_pop(struct media_graph *graph) { struct media_entity *entity; @@ -285,35 +285,35 @@ static struct media_entity *stack_pop(struct media_entity_graph *graph) #define MEDIA_ENTITY_MAX_PADS 512 /** - * media_entity_graph_walk_init - Allocate resources for graph walk + * media_graph_walk_init - Allocate resources for graph walk * @graph: Media graph structure that will be used to walk the graph * @mdev: Media device * * Reserve resources for graph walk in media device's current * state. The memory must be released using - * media_entity_graph_walk_free(). + * media_graph_walk_free(). * * Returns error on failure, zero on success. */ -__must_check int media_entity_graph_walk_init( - struct media_entity_graph *graph, struct media_device *mdev) +__must_check int media_graph_walk_init( + struct media_graph *graph, struct media_device *mdev) { return media_entity_enum_init(&graph->ent_enum, mdev); } -EXPORT_SYMBOL_GPL(media_entity_graph_walk_init); +EXPORT_SYMBOL_GPL(media_graph_walk_init); /** - * media_entity_graph_walk_cleanup - Release resources related to graph walking + * media_graph_walk_cleanup - Release resources related to graph walking * @graph: Media graph structure that was used to walk the graph */ -void media_entity_graph_walk_cleanup(struct media_entity_graph *graph) +void media_graph_walk_cleanup(struct media_graph *graph) { media_entity_enum_cleanup(&graph->ent_enum); } -EXPORT_SYMBOL_GPL(media_entity_graph_walk_cleanup); +EXPORT_SYMBOL_GPL(media_graph_walk_cleanup); -void media_entity_graph_walk_start(struct media_entity_graph *graph, - struct media_entity *entity) +void media_graph_walk_start(struct media_graph *graph, + struct media_entity *entity) { media_entity_enum_zero(&graph->ent_enum); media_entity_enum_set(&graph->ent_enum, entity); @@ -322,10 +322,9 @@ void media_entity_graph_walk_start(struct media_entity_graph *graph, graph->stack[graph->top].entity = NULL; stack_push(graph, entity); } -EXPORT_SYMBOL_GPL(media_entity_graph_walk_start); +EXPORT_SYMBOL_GPL(media_graph_walk_start); -struct media_entity * -media_entity_graph_walk_next(struct media_entity_graph *graph) +struct media_entity *media_graph_walk_next(struct media_graph *graph) { if (stack_top(graph) == NULL) return NULL; @@ -364,30 +363,30 @@ media_entity_graph_walk_next(struct media_entity_graph *graph) return stack_pop(graph); } -EXPORT_SYMBOL_GPL(media_entity_graph_walk_next); +EXPORT_SYMBOL_GPL(media_graph_walk_next); /* ----------------------------------------------------------------------------- * Pipeline management */ -__must_check int __media_entity_pipeline_start(struct media_entity *entity, - struct media_pipeline *pipe) +__must_check int __media_pipeline_start(struct media_entity *entity, + struct media_pipeline *pipe) { struct media_device *mdev = entity->graph_obj.mdev; - struct media_entity_graph *graph = &pipe->graph; + struct media_graph *graph = &pipe->graph; struct media_entity *entity_err = entity; struct media_link *link; int ret; if (!pipe->streaming_count++) { - ret = media_entity_graph_walk_init(&pipe->graph, mdev); + ret = media_graph_walk_init(&pipe->graph, mdev); if (ret) goto error_graph_walk_start; } - media_entity_graph_walk_start(&pipe->graph, entity); + media_graph_walk_start(&pipe->graph, entity); - while ((entity = media_entity_graph_walk_next(graph))) { + while ((entity = media_graph_walk_next(graph))) { DECLARE_BITMAP(active, MEDIA_ENTITY_MAX_PADS); DECLARE_BITMAP(has_no_links, MEDIA_ENTITY_MAX_PADS); @@ -466,9 +465,9 @@ error: * Link validation on graph failed. We revert what we did and * return the error. */ - media_entity_graph_walk_start(graph, entity_err); + media_graph_walk_start(graph, entity_err); - while ((entity_err = media_entity_graph_walk_next(graph))) { + while ((entity_err = media_graph_walk_next(graph))) { /* Sanity check for negative stream_count */ if (!WARN_ON_ONCE(entity_err->stream_count <= 0)) { entity_err->stream_count--; @@ -486,35 +485,35 @@ error: error_graph_walk_start: if (!--pipe->streaming_count) - media_entity_graph_walk_cleanup(graph); + media_graph_walk_cleanup(graph); return ret; } -EXPORT_SYMBOL_GPL(__media_entity_pipeline_start); +EXPORT_SYMBOL_GPL(__media_pipeline_start); -__must_check int media_entity_pipeline_start(struct media_entity *entity, - struct media_pipeline *pipe) +__must_check int media_pipeline_start(struct media_entity *entity, + struct media_pipeline *pipe) { struct media_device *mdev = entity->graph_obj.mdev; int ret; mutex_lock(&mdev->graph_mutex); - ret = __media_entity_pipeline_start(entity, pipe); + ret = __media_pipeline_start(entity, pipe); mutex_unlock(&mdev->graph_mutex); return ret; } -EXPORT_SYMBOL_GPL(media_entity_pipeline_start); +EXPORT_SYMBOL_GPL(media_pipeline_start); -void __media_entity_pipeline_stop(struct media_entity *entity) +void __media_pipeline_stop(struct media_entity *entity) { - struct media_entity_graph *graph = &entity->pipe->graph; + struct media_graph *graph = &entity->pipe->graph; struct media_pipeline *pipe = entity->pipe; WARN_ON(!pipe->streaming_count); - media_entity_graph_walk_start(graph, entity); + media_graph_walk_start(graph, entity); - while ((entity = media_entity_graph_walk_next(graph))) { + while ((entity = media_graph_walk_next(graph))) { /* Sanity check for negative stream_count */ if (!WARN_ON_ONCE(entity->stream_count <= 0)) { entity->stream_count--; @@ -524,20 +523,20 @@ void __media_entity_pipeline_stop(struct media_entity *entity) } if (!--pipe->streaming_count) - media_entity_graph_walk_cleanup(graph); + media_graph_walk_cleanup(graph); } -EXPORT_SYMBOL_GPL(__media_entity_pipeline_stop); +EXPORT_SYMBOL_GPL(__media_pipeline_stop); -void media_entity_pipeline_stop(struct media_entity *entity) +void media_pipeline_stop(struct media_entity *entity) { struct media_device *mdev = entity->graph_obj.mdev; mutex_lock(&mdev->graph_mutex); - __media_entity_pipeline_stop(entity); + __media_pipeline_stop(entity); mutex_unlock(&mdev->graph_mutex); } -EXPORT_SYMBOL_GPL(media_entity_pipeline_stop); +EXPORT_SYMBOL_GPL(media_pipeline_stop); /* ----------------------------------------------------------------------------- * Module use count diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c index 964f4a681934..7bde62f28e4c 100644 --- a/drivers/media/platform/exynos4-is/fimc-capture.c +++ b/drivers/media/platform/exynos4-is/fimc-capture.c @@ -536,7 +536,7 @@ static int fimc_capture_release(struct file *file) mutex_lock(&fimc->lock); if (close && vc->streaming) { - media_entity_pipeline_stop(&vc->ve.vdev.entity); + media_pipeline_stop(&vc->ve.vdev.entity); vc->streaming = false; } @@ -1195,7 +1195,7 @@ static int fimc_cap_streamon(struct file *file, void *priv, if (fimc_capture_active(fimc)) return -EBUSY; - ret = media_entity_pipeline_start(entity, &vc->ve.pipe->mp); + ret = media_pipeline_start(entity, &vc->ve.pipe->mp); if (ret < 0) return ret; @@ -1229,7 +1229,7 @@ static int fimc_cap_streamon(struct file *file, void *priv, } err_p_stop: - media_entity_pipeline_stop(entity); + media_pipeline_stop(entity); return ret; } @@ -1244,7 +1244,7 @@ static int fimc_cap_streamoff(struct file *file, void *priv, if (ret < 0) return ret; - media_entity_pipeline_stop(&vc->ve.vdev.entity); + media_pipeline_stop(&vc->ve.vdev.entity); vc->streaming = false; return 0; } diff --git a/drivers/media/platform/exynos4-is/fimc-isp-video.c b/drivers/media/platform/exynos4-is/fimc-isp-video.c index 400ce0cb0c0d..55ba696b8cf4 100644 --- a/drivers/media/platform/exynos4-is/fimc-isp-video.c +++ b/drivers/media/platform/exynos4-is/fimc-isp-video.c @@ -312,7 +312,7 @@ static int isp_video_release(struct file *file) mutex_lock(&isp->video_lock); if (v4l2_fh_is_singular_file(file) && ivc->streaming) { - media_entity_pipeline_stop(entity); + media_pipeline_stop(entity); ivc->streaming = 0; } @@ -489,7 +489,7 @@ static int isp_video_streamon(struct file *file, void *priv, struct media_entity *me = &ve->vdev.entity; int ret; - ret = media_entity_pipeline_start(me, &ve->pipe->mp); + ret = media_pipeline_start(me, &ve->pipe->mp); if (ret < 0) return ret; @@ -504,7 +504,7 @@ static int isp_video_streamon(struct file *file, void *priv, isp->video_capture.streaming = 1; return 0; p_stop: - media_entity_pipeline_stop(me); + media_pipeline_stop(me); return ret; } @@ -519,7 +519,7 @@ static int isp_video_streamoff(struct file *file, void *priv, if (ret < 0) return ret; - media_entity_pipeline_stop(&video->ve.vdev.entity); + media_pipeline_stop(&video->ve.vdev.entity); video->streaming = 0; return 0; } diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index b91abf1c4d43..b4c4a33784c4 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -524,7 +524,7 @@ static int fimc_lite_release(struct file *file) if (v4l2_fh_is_singular_file(file) && atomic_read(&fimc->out_path) == FIMC_IO_DMA) { if (fimc->streaming) { - media_entity_pipeline_stop(entity); + media_pipeline_stop(entity); fimc->streaming = false; } fimc_lite_stop_capture(fimc, false); @@ -832,7 +832,7 @@ static int fimc_lite_streamon(struct file *file, void *priv, if (fimc_lite_active(fimc)) return -EBUSY; - ret = media_entity_pipeline_start(entity, &fimc->ve.pipe->mp); + ret = media_pipeline_start(entity, &fimc->ve.pipe->mp); if (ret < 0) return ret; @@ -849,7 +849,7 @@ static int fimc_lite_streamon(struct file *file, void *priv, } err_p_stop: - media_entity_pipeline_stop(entity); + media_pipeline_stop(entity); return 0; } @@ -863,7 +863,7 @@ static int fimc_lite_streamoff(struct file *file, void *priv, if (ret < 0) return ret; - media_entity_pipeline_stop(&fimc->ve.vdev.entity); + media_pipeline_stop(&fimc->ve.vdev.entity); fimc->streaming = false; return 0; } diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index e3a8709138fa..735221a5b6b4 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -1117,7 +1117,7 @@ static int __fimc_md_modify_pipeline(struct media_entity *entity, bool enable) /* Locking: called with entity->graph_obj.mdev->graph_mutex mutex held. */ static int __fimc_md_modify_pipelines(struct media_entity *entity, bool enable, - struct media_entity_graph *graph) + struct media_graph *graph) { struct media_entity *entity_err = entity; int ret; @@ -1128,9 +1128,9 @@ static int __fimc_md_modify_pipelines(struct media_entity *entity, bool enable, * through active links. This is needed as we cannot power on/off the * subdevs in random order. */ - media_entity_graph_walk_start(graph, entity); + media_graph_walk_start(graph, entity); - while ((entity = media_entity_graph_walk_next(graph))) { + while ((entity = media_graph_walk_next(graph))) { if (!is_media_entity_v4l2_video_device(entity)) continue; @@ -1143,9 +1143,9 @@ static int __fimc_md_modify_pipelines(struct media_entity *entity, bool enable, return 0; err: - media_entity_graph_walk_start(graph, entity_err); + media_graph_walk_start(graph, entity_err); - while ((entity_err = media_entity_graph_walk_next(graph))) { + while ((entity_err = media_graph_walk_next(graph))) { if (!is_media_entity_v4l2_video_device(entity_err)) continue; @@ -1161,7 +1161,7 @@ err: static int fimc_md_link_notify(struct media_link *link, unsigned int flags, unsigned int notification) { - struct media_entity_graph *graph = + struct media_graph *graph = &container_of(link->graph_obj.mdev, struct fimc_md, media_dev)->link_setup_graph; struct media_entity *sink = link->sink->entity; @@ -1169,7 +1169,7 @@ static int fimc_md_link_notify(struct media_link *link, unsigned int flags, /* Before link disconnection */ if (notification == MEDIA_DEV_NOTIFY_PRE_LINK_CH) { - ret = media_entity_graph_walk_init(graph, + ret = media_graph_walk_init(graph, link->graph_obj.mdev); if (ret) return ret; @@ -1183,7 +1183,7 @@ static int fimc_md_link_notify(struct media_link *link, unsigned int flags, } else if (notification == MEDIA_DEV_NOTIFY_POST_LINK_CH) { if (link->flags & MEDIA_LNK_FL_ENABLED) ret = __fimc_md_modify_pipelines(sink, true, graph); - media_entity_graph_walk_cleanup(graph); + media_graph_walk_cleanup(graph); } return ret ? -EPIPE : 0; diff --git a/drivers/media/platform/exynos4-is/media-dev.h b/drivers/media/platform/exynos4-is/media-dev.h index ed122cb2dd74..957787a2f480 100644 --- a/drivers/media/platform/exynos4-is/media-dev.h +++ b/drivers/media/platform/exynos4-is/media-dev.h @@ -154,7 +154,7 @@ struct fimc_md { bool user_subdev_api; spinlock_t slock; struct list_head pipelines; - struct media_entity_graph link_setup_graph; + struct media_graph link_setup_graph; }; static inline diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c index 7354469670b7..5b0d16e10aa5 100644 --- a/drivers/media/platform/omap3isp/ispvideo.c +++ b/drivers/media/platform/omap3isp/ispvideo.c @@ -225,22 +225,22 @@ isp_video_remote_subdev(struct isp_video *video, u32 *pad) static int isp_video_get_graph_data(struct isp_video *video, struct isp_pipeline *pipe) { - struct media_entity_graph graph; + struct media_graph graph; struct media_entity *entity = &video->video.entity; struct media_device *mdev = entity->graph_obj.mdev; struct isp_video *far_end = NULL; int ret; mutex_lock(&mdev->graph_mutex); - ret = media_entity_graph_walk_init(&graph, entity->graph_obj.mdev); + ret = media_graph_walk_init(&graph, entity->graph_obj.mdev); if (ret) { mutex_unlock(&mdev->graph_mutex); return ret; } - media_entity_graph_walk_start(&graph, entity); + media_graph_walk_start(&graph, entity); - while ((entity = media_entity_graph_walk_next(&graph))) { + while ((entity = media_graph_walk_next(&graph))) { struct isp_video *__video; media_entity_enum_set(&pipe->ent_enum, entity); @@ -261,7 +261,7 @@ static int isp_video_get_graph_data(struct isp_video *video, mutex_unlock(&mdev->graph_mutex); - media_entity_graph_walk_cleanup(&graph); + media_graph_walk_cleanup(&graph); if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { pipe->input = far_end; @@ -1112,7 +1112,7 @@ isp_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) pipe->l3_ick = clk_get_rate(video->isp->clock[ISP_CLK_L3_ICK]); pipe->max_rate = pipe->l3_ick; - ret = media_entity_pipeline_start(&video->video.entity, &pipe->pipe); + ret = media_pipeline_start(&video->video.entity, &pipe->pipe); if (ret < 0) goto err_pipeline_start; @@ -1169,7 +1169,7 @@ isp_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) return 0; err_check_format: - media_entity_pipeline_stop(&video->video.entity); + media_pipeline_stop(&video->video.entity); err_pipeline_start: /* TODO: Implement PM QoS */ /* The DMA queue must be emptied here, otherwise CCDC interrupts that @@ -1236,7 +1236,7 @@ isp_video_streamoff(struct file *file, void *fh, enum v4l2_buf_type type) video->error = false; /* TODO: Implement PM QoS */ - media_entity_pipeline_stop(&video->video.entity); + media_pipeline_stop(&video->video.entity); media_entity_enum_cleanup(&pipe->ent_enum); diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c index 0413a861a59a..e01ecca46866 100644 --- a/drivers/media/platform/s3c-camif/camif-capture.c +++ b/drivers/media/platform/s3c-camif/camif-capture.c @@ -856,13 +856,13 @@ static int s3c_camif_streamon(struct file *file, void *priv, if (s3c_vp_active(vp)) return 0; - ret = media_entity_pipeline_start(sensor, camif->m_pipeline); + ret = media_pipeline_start(sensor, camif->m_pipeline); if (ret < 0) return ret; ret = camif_pipeline_validate(camif); if (ret < 0) { - media_entity_pipeline_stop(sensor); + media_pipeline_stop(sensor); return ret; } @@ -886,7 +886,7 @@ static int s3c_camif_streamoff(struct file *file, void *priv, ret = vb2_streamoff(&vp->vb_queue, type); if (ret == 0) - media_entity_pipeline_stop(&camif->sensor.sd->entity); + media_pipeline_stop(&camif->sensor.sd->entity); return ret; } diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c index cd209dccff1b..b4b583f7137a 100644 --- a/drivers/media/platform/vsp1/vsp1_drm.c +++ b/drivers/media/platform/vsp1/vsp1_drm.c @@ -90,7 +90,7 @@ int vsp1_du_setup_lif(struct device *dev, unsigned int width, if (ret == -ETIMEDOUT) dev_err(vsp1->dev, "DRM pipeline stop timeout\n"); - media_entity_pipeline_stop(&pipe->output->entity.subdev.entity); + media_pipeline_stop(&pipe->output->entity.subdev.entity); for (i = 0; i < bru->entity.source_pad; ++i) { vsp1->drm->inputs[i].enabled = false; @@ -196,7 +196,7 @@ int vsp1_du_setup_lif(struct device *dev, unsigned int width, if (ret < 0) return ret; - ret = media_entity_pipeline_start(&pipe->output->entity.subdev.entity, + ret = media_pipeline_start(&pipe->output->entity.subdev.entity, &pipe->pipe); if (ret < 0) { dev_dbg(vsp1->dev, "%s: pipeline start failed\n", __func__); diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c index 41e8b096dab8..e6592b576ca3 100644 --- a/drivers/media/platform/vsp1/vsp1_video.c +++ b/drivers/media/platform/vsp1/vsp1_video.c @@ -548,20 +548,20 @@ out: static int vsp1_video_pipeline_build(struct vsp1_pipeline *pipe, struct vsp1_video *video) { - struct media_entity_graph graph; + struct media_graph graph; struct media_entity *entity = &video->video.entity; struct media_device *mdev = entity->graph_obj.mdev; unsigned int i; int ret; /* Walk the graph to locate the entities and video nodes. */ - ret = media_entity_graph_walk_init(&graph, mdev); + ret = media_graph_walk_init(&graph, mdev); if (ret) return ret; - media_entity_graph_walk_start(&graph, entity); + media_graph_walk_start(&graph, entity); - while ((entity = media_entity_graph_walk_next(&graph))) { + while ((entity = media_graph_walk_next(&graph))) { struct v4l2_subdev *subdev; struct vsp1_rwpf *rwpf; struct vsp1_entity *e; @@ -590,7 +590,7 @@ static int vsp1_video_pipeline_build(struct vsp1_pipeline *pipe, } } - media_entity_graph_walk_cleanup(&graph); + media_graph_walk_cleanup(&graph); /* We need one output and at least one input. */ if (pipe->num_inputs == 0 || !pipe->output) @@ -848,7 +848,7 @@ static void vsp1_video_stop_streaming(struct vb2_queue *vq) } mutex_unlock(&pipe->lock); - media_entity_pipeline_stop(&video->video.entity); + media_pipeline_stop(&video->video.entity); vsp1_video_pipeline_put(pipe); /* Remove all buffers from the IRQ queue. */ @@ -980,7 +980,7 @@ vsp1_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) return PTR_ERR(pipe); } - ret = __media_entity_pipeline_start(&video->video.entity, &pipe->pipe); + ret = __media_pipeline_start(&video->video.entity, &pipe->pipe); if (ret < 0) { mutex_unlock(&mdev->graph_mutex); goto err_pipe; @@ -1003,7 +1003,7 @@ vsp1_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) return 0; err_stop: - media_entity_pipeline_stop(&video->video.entity); + media_pipeline_stop(&video->video.entity); err_pipe: vsp1_video_pipeline_put(pipe); return ret; diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c index 1d5836c3fb7a..065df82a2cef 100644 --- a/drivers/media/platform/xilinx/xilinx-dma.c +++ b/drivers/media/platform/xilinx/xilinx-dma.c @@ -177,7 +177,7 @@ done: static int xvip_pipeline_validate(struct xvip_pipeline *pipe, struct xvip_dma *start) { - struct media_entity_graph graph; + struct media_graph graph; struct media_entity *entity = &start->video.entity; struct media_device *mdev = entity->graph_obj.mdev; unsigned int num_inputs = 0; @@ -187,15 +187,15 @@ static int xvip_pipeline_validate(struct xvip_pipeline *pipe, mutex_lock(&mdev->graph_mutex); /* Walk the graph to locate the video nodes. */ - ret = media_entity_graph_walk_init(&graph, entity->graph_obj.mdev); + ret = media_graph_walk_init(&graph, entity->graph_obj.mdev); if (ret) { mutex_unlock(&mdev->graph_mutex); return ret; } - media_entity_graph_walk_start(&graph, entity); + media_graph_walk_start(&graph, entity); - while ((entity = media_entity_graph_walk_next(&graph))) { + while ((entity = media_graph_walk_next(&graph))) { struct xvip_dma *dma; if (entity->function != MEDIA_ENT_F_IO_V4L) @@ -213,7 +213,7 @@ static int xvip_pipeline_validate(struct xvip_pipeline *pipe, mutex_unlock(&mdev->graph_mutex); - media_entity_graph_walk_cleanup(&graph); + media_graph_walk_cleanup(&graph); /* We need exactly one output and zero or one input. */ if (num_outputs != 1 || num_inputs > 1) @@ -409,7 +409,7 @@ static int xvip_dma_start_streaming(struct vb2_queue *vq, unsigned int count) pipe = dma->video.entity.pipe ? to_xvip_pipeline(&dma->video.entity) : &dma->pipe; - ret = media_entity_pipeline_start(&dma->video.entity, &pipe->pipe); + ret = media_pipeline_start(&dma->video.entity, &pipe->pipe); if (ret < 0) goto error; @@ -435,7 +435,7 @@ static int xvip_dma_start_streaming(struct vb2_queue *vq, unsigned int count) return 0; error_stop: - media_entity_pipeline_stop(&dma->video.entity); + media_pipeline_stop(&dma->video.entity); error: /* Give back all queued buffers to videobuf2. */ @@ -463,7 +463,7 @@ static void xvip_dma_stop_streaming(struct vb2_queue *vq) /* Cleanup the pipeline and mark it as being stopped. */ xvip_pipeline_cleanup(pipe); - media_entity_pipeline_stop(&dma->video.entity); + media_pipeline_stop(&dma->video.entity); /* Give back all queued buffers to videobuf2. */ spin_lock_irq(&dma->queued_lock); diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index 4e14e1125f8e..8c0494042d06 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c @@ -393,7 +393,7 @@ static int au0828_enable_source(struct media_entity *entity, goto end; } - ret = __media_entity_pipeline_start(entity, pipe); + ret = __media_pipeline_start(entity, pipe); if (ret) { pr_err("Start Pipeline: %s->%s Error %d\n", source->name, entity->name, ret); @@ -447,7 +447,7 @@ static void au0828_disable_source(struct media_entity *entity) */ if (dev->active_link_owner != entity) goto end; - __media_entity_pipeline_stop(entity); + __media_pipeline_stop(entity); ret = __media_entity_setup_link(dev->active_link, 0); if (ret) pr_err("Deactivate link Error %d\n", ret); diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c index 8bef4331bd51..fcf614a82bb8 100644 --- a/drivers/media/v4l2-core/v4l2-mc.c +++ b/drivers/media/v4l2-core/v4l2-mc.c @@ -256,13 +256,13 @@ EXPORT_SYMBOL_GPL(v4l_vb2q_enable_media_source); * Return the total number of users of all video device nodes in the pipeline. */ static int pipeline_pm_use_count(struct media_entity *entity, - struct media_entity_graph *graph) + struct media_graph *graph) { int use = 0; - media_entity_graph_walk_start(graph, entity); + media_graph_walk_start(graph, entity); - while ((entity = media_entity_graph_walk_next(graph))) { + while ((entity = media_graph_walk_next(graph))) { if (is_media_entity_v4l2_video_device(entity)) use += entity->use_count; } @@ -315,7 +315,7 @@ static int pipeline_pm_power_one(struct media_entity *entity, int change) * Return 0 on success or a negative error code on failure. */ static int pipeline_pm_power(struct media_entity *entity, int change, - struct media_entity_graph *graph) + struct media_graph *graph) { struct media_entity *first = entity; int ret = 0; @@ -323,18 +323,18 @@ static int pipeline_pm_power(struct media_entity *entity, int change, if (!change) return 0; - media_entity_graph_walk_start(graph, entity); + media_graph_walk_start(graph, entity); - while (!ret && (entity = media_entity_graph_walk_next(graph))) + while (!ret && (entity = media_graph_walk_next(graph))) if (is_media_entity_v4l2_subdev(entity)) ret = pipeline_pm_power_one(entity, change); if (!ret) return ret; - media_entity_graph_walk_start(graph, first); + media_graph_walk_start(graph, first); - while ((first = media_entity_graph_walk_next(graph)) + while ((first = media_graph_walk_next(graph)) && first != entity) if (is_media_entity_v4l2_subdev(first)) pipeline_pm_power_one(first, -change); @@ -368,7 +368,7 @@ EXPORT_SYMBOL_GPL(v4l2_pipeline_pm_use); int v4l2_pipeline_link_notify(struct media_link *link, u32 flags, unsigned int notification) { - struct media_entity_graph *graph = &link->graph_obj.mdev->pm_count_walk; + struct media_graph *graph = &link->graph_obj.mdev->pm_count_walk; struct media_entity *source = link->source->entity; struct media_entity *sink = link->sink->entity; int source_use; diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index c27d7e9a1bdb..03269d37a376 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -129,7 +129,7 @@ __vpfe_video_get_format(struct vpfe_video_device *video, /* make a note of pipeline details */ static int vpfe_prepare_pipeline(struct vpfe_video_device *video) { - struct media_entity_graph graph; + struct media_graph graph; struct media_entity *entity = &video->video_dev.entity; struct media_device *mdev = entity->graph_obj.mdev; struct vpfe_pipeline *pipe = &video->pipe; @@ -145,13 +145,13 @@ static int vpfe_prepare_pipeline(struct vpfe_video_device *video) pipe->outputs[pipe->output_num++] = video; mutex_lock(&mdev->graph_mutex); - ret = media_entity_graph_walk_init(&graph, entity->graph_obj.mdev); + ret = media_graph_walk_init(&graph, entity->graph_obj.mdev); if (ret) { mutex_unlock(&mdev->graph_mutex); return -ENOMEM; } - media_entity_graph_walk_start(&graph, entity); - while ((entity = media_entity_graph_walk_next(&graph))) { + media_graph_walk_start(&graph, entity); + while ((entity = media_graph_walk_next(&graph))) { if (entity == &video->video_dev.entity) continue; if (!is_media_entity_v4l2_video_device(entity)) @@ -162,7 +162,7 @@ static int vpfe_prepare_pipeline(struct vpfe_video_device *video) else pipe->outputs[pipe->output_num++] = far_end; } - media_entity_graph_walk_cleanup(&graph); + media_graph_walk_cleanup(&graph); mutex_unlock(&mdev->graph_mutex); return 0; @@ -300,12 +300,11 @@ static int vpfe_pipeline_enable(struct vpfe_pipeline *pipe) mdev = entity->graph_obj.mdev; mutex_lock(&mdev->graph_mutex); - ret = media_entity_graph_walk_init(&pipe->graph, - entity->graph_obj.mdev); + ret = media_graph_walk_init(&pipe->graph, entity->graph_obj.mdev); if (ret) goto out; - media_entity_graph_walk_start(&pipe->graph, entity); - while ((entity = media_entity_graph_walk_next(&pipe->graph))) { + media_graph_walk_start(&pipe->graph, entity); + while ((entity = media_graph_walk_next(&pipe->graph))) { if (!is_media_entity_v4l2_subdev(entity)) continue; @@ -316,7 +315,7 @@ static int vpfe_pipeline_enable(struct vpfe_pipeline *pipe) } out: if (ret) - media_entity_graph_walk_cleanup(&pipe->graph); + media_graph_walk_cleanup(&pipe->graph); mutex_unlock(&mdev->graph_mutex); return ret; } @@ -346,9 +345,9 @@ static int vpfe_pipeline_disable(struct vpfe_pipeline *pipe) mdev = entity->graph_obj.mdev; mutex_lock(&mdev->graph_mutex); - media_entity_graph_walk_start(&pipe->graph, entity); + media_graph_walk_start(&pipe->graph, entity); - while ((entity = media_entity_graph_walk_next(&pipe->graph))) { + while ((entity = media_graph_walk_next(&pipe->graph))) { if (!is_media_entity_v4l2_subdev(entity)) continue; @@ -359,7 +358,7 @@ static int vpfe_pipeline_disable(struct vpfe_pipeline *pipe) } mutex_unlock(&mdev->graph_mutex); - media_entity_graph_walk_cleanup(&pipe->graph); + media_graph_walk_cleanup(&pipe->graph); return ret ? -ETIMEDOUT : 0; } diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.h b/drivers/staging/media/davinci_vpfe/vpfe_video.h index aaec4403df3b..22136d3dadcb 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.h +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.h @@ -52,7 +52,7 @@ enum vpfe_video_state { struct vpfe_pipeline { /* media pipeline */ struct media_pipeline *pipe; - struct media_entity_graph graph; + struct media_graph graph; /* state of the pipeline, continuous, * single-shot or stopped */ diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c index c16927ac8eb0..f4b0e660109f 100644 --- a/drivers/staging/media/omap4iss/iss_video.c +++ b/drivers/staging/media/omap4iss/iss_video.c @@ -205,21 +205,21 @@ iss_video_remote_subdev(struct iss_video *video, u32 *pad) static struct iss_video * iss_video_far_end(struct iss_video *video) { - struct media_entity_graph graph; + struct media_graph graph; struct media_entity *entity = &video->video.entity; struct media_device *mdev = entity->graph_obj.mdev; struct iss_video *far_end = NULL; mutex_lock(&mdev->graph_mutex); - if (media_entity_graph_walk_init(&graph, mdev)) { + if (media_graph_walk_init(&graph, mdev)) { mutex_unlock(&mdev->graph_mutex); return NULL; } - media_entity_graph_walk_start(&graph, entity); + media_graph_walk_start(&graph, entity); - while ((entity = media_entity_graph_walk_next(&graph))) { + while ((entity = media_graph_walk_next(&graph))) { if (entity == &video->video.entity) continue; @@ -235,7 +235,7 @@ iss_video_far_end(struct iss_video *video) mutex_unlock(&mdev->graph_mutex); - media_entity_graph_walk_cleanup(&graph); + media_graph_walk_cleanup(&graph); return far_end; } @@ -854,7 +854,7 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) { struct iss_video_fh *vfh = to_iss_video_fh(fh); struct iss_video *video = video_drvdata(file); - struct media_entity_graph graph; + struct media_graph graph; struct media_entity *entity = &video->video.entity; enum iss_pipeline_state state; struct iss_pipeline *pipe; @@ -880,19 +880,19 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) if (ret) goto err_graph_walk_init; - ret = media_entity_graph_walk_init(&graph, entity->graph_obj.mdev); + ret = media_graph_walk_init(&graph, entity->graph_obj.mdev); if (ret) goto err_graph_walk_init; if (video->iss->pdata->set_constraints) video->iss->pdata->set_constraints(video->iss, true); - ret = media_entity_pipeline_start(entity, &pipe->pipe); + ret = media_pipeline_start(entity, &pipe->pipe); if (ret < 0) - goto err_media_entity_pipeline_start; + goto err_media_pipeline_start; - media_entity_graph_walk_start(&graph, entity); - while ((entity = media_entity_graph_walk_next(&graph))) + media_graph_walk_start(&graph, entity); + while ((entity = media_graph_walk_next(&graph))) media_entity_enum_set(&pipe->ent_enum, entity); /* Verify that the currently configured format matches the output of @@ -963,7 +963,7 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) spin_unlock_irqrestore(&video->qlock, flags); } - media_entity_graph_walk_cleanup(&graph); + media_graph_walk_cleanup(&graph); mutex_unlock(&video->stream_lock); @@ -972,13 +972,13 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) err_omap4iss_set_stream: vb2_streamoff(&vfh->queue, type); err_iss_video_check_format: - media_entity_pipeline_stop(&video->video.entity); -err_media_entity_pipeline_start: + media_pipeline_stop(&video->video.entity); +err_media_pipeline_start: if (video->iss->pdata->set_constraints) video->iss->pdata->set_constraints(video->iss, false); video->queue = NULL; - media_entity_graph_walk_cleanup(&graph); + media_graph_walk_cleanup(&graph); err_graph_walk_init: media_entity_enum_cleanup(&pipe->ent_enum); @@ -1026,7 +1026,7 @@ iss_video_streamoff(struct file *file, void *fh, enum v4l2_buf_type type) if (video->iss->pdata->set_constraints) video->iss->pdata->set_constraints(video->iss, false); - media_entity_pipeline_stop(&video->video.entity); + media_pipeline_stop(&video->video.entity); done: mutex_unlock(&video->stream_lock); diff --git a/include/media/media-device.h b/include/media/media-device.h index e9f1224ca45b..ae4eef416d70 100644 --- a/include/media/media-device.h +++ b/include/media/media-device.h @@ -150,7 +150,7 @@ struct media_device { /* Serializes graph operations. */ struct mutex graph_mutex; - struct media_entity_graph pm_count_walk; + struct media_graph pm_count_walk; void *source_priv; int (*enable_source)(struct media_entity *entity, diff --git a/include/media/media-entity.h b/include/media/media-entity.h index 8a69550f30f8..c7c254c5bca1 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -82,7 +82,7 @@ struct media_entity_enum { }; /** - * struct media_entity_graph - Media graph traversal state + * struct media_graph - Media graph traversal state * * @stack: Graph traversal stack; the stack contains information * on the path the media entities to be walked and the @@ -90,7 +90,7 @@ struct media_entity_enum { * @ent_enum: Visited entities * @top: The top of the stack */ -struct media_entity_graph { +struct media_graph { struct { struct media_entity *entity; struct list_head *link; @@ -108,7 +108,7 @@ struct media_entity_graph { */ struct media_pipeline { int streaming_count; - struct media_entity_graph graph; + struct media_graph graph; }; /** @@ -175,7 +175,7 @@ struct media_pad { * return an error, in which case link setup will be * cancelled. Optional. * @link_validate: Return whether a link is valid from the entity point of - * view. The media_entity_pipeline_start() function + * view. The media_pipeline_start() function * validates all links by calling this operation. Optional. * * .. note:: @@ -816,20 +816,20 @@ struct media_pad *media_entity_remote_pad(struct media_pad *pad); struct media_entity *media_entity_get(struct media_entity *entity); /** - * media_entity_graph_walk_init - Allocate resources used by graph walk. + * media_graph_walk_init - Allocate resources used by graph walk. * * @graph: Media graph structure that will be used to walk the graph * @mdev: Pointer to the &media_device that contains the object */ -__must_check int media_entity_graph_walk_init( - struct media_entity_graph *graph, struct media_device *mdev); +__must_check int media_graph_walk_init( + struct media_graph *graph, struct media_device *mdev); /** - * media_entity_graph_walk_cleanup - Release resources used by graph walk. + * media_graph_walk_cleanup - Release resources used by graph walk. * * @graph: Media graph structure that will be used to walk the graph */ -void media_entity_graph_walk_cleanup(struct media_entity_graph *graph); +void media_graph_walk_cleanup(struct media_graph *graph); /** * media_entity_put - Release the reference to the parent module @@ -843,40 +843,39 @@ void media_entity_graph_walk_cleanup(struct media_entity_graph *graph); void media_entity_put(struct media_entity *entity); /** - * media_entity_graph_walk_start - Start walking the media graph at a + * media_graph_walk_start - Start walking the media graph at a * given entity * * @graph: Media graph structure that will be used to walk the graph * @entity: Starting entity * - * Before using this function, media_entity_graph_walk_init() must be + * Before using this function, media_graph_walk_init() must be * used to allocate resources used for walking the graph. This * function initializes the graph traversal structure to walk the * entities graph starting at the given entity. The traversal * structure must not be modified by the caller during graph * traversal. After the graph walk, the resources must be released - * using media_entity_graph_walk_cleanup(). + * using media_graph_walk_cleanup(). */ -void media_entity_graph_walk_start(struct media_entity_graph *graph, - struct media_entity *entity); +void media_graph_walk_start(struct media_graph *graph, + struct media_entity *entity); /** - * media_entity_graph_walk_next - Get the next entity in the graph + * media_graph_walk_next - Get the next entity in the graph * @graph: Media graph structure * * Perform a depth-first traversal of the given media entities graph. * * The graph structure must have been previously initialized with a call to - * media_entity_graph_walk_start(). + * media_graph_walk_start(). * * Return: returns the next entity in the graph or %NULL if the whole graph * have been traversed. */ -struct media_entity * -media_entity_graph_walk_next(struct media_entity_graph *graph); +struct media_entity *media_graph_walk_next(struct media_graph *graph); /** - * media_entity_pipeline_start - Mark a pipeline as streaming + * media_pipeline_start - Mark a pipeline as streaming * @entity: Starting entity * @pipe: Media pipeline to be assigned to all entities in the pipeline. * @@ -885,45 +884,45 @@ media_entity_graph_walk_next(struct media_entity_graph *graph); * to every entity in the pipeline and stored in the media_entity pipe field. * * Calls to this function can be nested, in which case the same number of - * media_entity_pipeline_stop() calls will be required to stop streaming. The + * media_pipeline_stop() calls will be required to stop streaming. The * pipeline pointer must be identical for all nested calls to - * media_entity_pipeline_start(). + * media_pipeline_start(). */ -__must_check int media_entity_pipeline_start(struct media_entity *entity, - struct media_pipeline *pipe); +__must_check int media_pipeline_start(struct media_entity *entity, + struct media_pipeline *pipe); /** - * __media_entity_pipeline_start - Mark a pipeline as streaming + * __media_pipeline_start - Mark a pipeline as streaming * * @entity: Starting entity * @pipe: Media pipeline to be assigned to all entities in the pipeline. * - * ..note:: This is the non-locking version of media_entity_pipeline_start() + * ..note:: This is the non-locking version of media_pipeline_start() */ -__must_check int __media_entity_pipeline_start(struct media_entity *entity, - struct media_pipeline *pipe); +__must_check int __media_pipeline_start(struct media_entity *entity, + struct media_pipeline *pipe); /** - * media_entity_pipeline_stop - Mark a pipeline as not streaming + * media_pipeline_stop - Mark a pipeline as not streaming * @entity: Starting entity * * Mark all entities connected to a given entity through enabled links, either * directly or indirectly, as not streaming. The media_entity pipe field is * reset to %NULL. * - * If multiple calls to media_entity_pipeline_start() have been made, the same + * If multiple calls to media_pipeline_start() have been made, the same * number of calls to this function are required to mark the pipeline as not * streaming. */ -void media_entity_pipeline_stop(struct media_entity *entity); +void media_pipeline_stop(struct media_entity *entity); /** - * __media_entity_pipeline_stop - Mark a pipeline as not streaming + * __media_pipeline_stop - Mark a pipeline as not streaming * * @entity: Starting entity * - * .. note:: This is the non-locking version of media_entity_pipeline_stop() + * .. note:: This is the non-locking version of media_pipeline_stop() */ -void __media_entity_pipeline_stop(struct media_entity *entity); +void __media_pipeline_stop(struct media_entity *entity); /** * media_devnode_create() - creates and initializes a device node interface -- cgit v1.2.3-55-g7522 From 517b500713fd321f1519996904a7c21a141ad3e9 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Sun, 20 Nov 2016 07:45:52 -0200 Subject: [media] cxusb: port to rc-core The d680_dmb keymap has some new new mappings. Tested-by: Vincent McIntyre Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/keymaps/Makefile | 3 + drivers/media/rc/keymaps/rc-d680-dmb.c | 75 +++++++ drivers/media/rc/keymaps/rc-dvico-mce.c | 85 ++++++++ drivers/media/rc/keymaps/rc-dvico-portable.c | 76 +++++++ drivers/media/usb/dvb-usb/cxusb.c | 312 +++++++-------------------- include/media/rc-map.h | 3 + 6 files changed, 322 insertions(+), 232 deletions(-) create mode 100644 drivers/media/rc/keymaps/rc-d680-dmb.c create mode 100644 drivers/media/rc/keymaps/rc-dvico-mce.c create mode 100644 drivers/media/rc/keymaps/rc-dvico-portable.c (limited to 'drivers/media/usb') diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index d7b13fae1267..11d5d5a053a5 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-cec.o \ rc-cinergy-1400.o \ rc-cinergy.o \ + rc-d680-dmb.o \ rc-delock-61959.o \ rc-dib0700-nec.o \ rc-dib0700-rc5.o \ @@ -31,6 +32,8 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-dntv-live-dvbt-pro.o \ rc-dtt200u.o \ rc-dvbsky.o \ + rc-dvico-mce.o \ + rc-dvico-portable.o \ rc-em-terratec.o \ rc-encore-enltv2.o \ rc-encore-enltv.o \ diff --git a/drivers/media/rc/keymaps/rc-d680-dmb.c b/drivers/media/rc/keymaps/rc-d680-dmb.c new file mode 100644 index 000000000000..bb5745d29d8a --- /dev/null +++ b/drivers/media/rc/keymaps/rc-d680-dmb.c @@ -0,0 +1,75 @@ +/* + * keymap imported from cxusb.c + * + * Copyright (C) 2016 Sean Young + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2. + */ + +#include +#include + +static struct rc_map_table rc_map_d680_dmb_table[] = { + { 0x0038, KEY_SWITCHVIDEOMODE }, /* TV/AV */ + { 0x080c, KEY_ZOOM }, + { 0x0800, KEY_0 }, + { 0x0001, KEY_1 }, + { 0x0802, KEY_2 }, + { 0x0003, KEY_3 }, + { 0x0804, KEY_4 }, + { 0x0005, KEY_5 }, + { 0x0806, KEY_6 }, + { 0x0007, KEY_7 }, + { 0x0808, KEY_8 }, + { 0x0009, KEY_9 }, + { 0x000a, KEY_MUTE }, + { 0x0829, KEY_BACK }, + { 0x0012, KEY_CHANNELUP }, + { 0x0813, KEY_CHANNELDOWN }, + { 0x002b, KEY_VOLUMEUP }, + { 0x082c, KEY_VOLUMEDOWN }, + { 0x0020, KEY_UP }, + { 0x0821, KEY_DOWN }, + { 0x0011, KEY_LEFT }, + { 0x0810, KEY_RIGHT }, + { 0x000d, KEY_OK }, + { 0x081f, KEY_RECORD }, + { 0x0017, KEY_PLAYPAUSE }, + { 0x0816, KEY_PLAYPAUSE }, + { 0x000b, KEY_STOP }, + { 0x0827, KEY_FASTFORWARD }, + { 0x0026, KEY_REWIND }, + { 0x081e, KEY_UNKNOWN }, /* Time Shift */ + { 0x000e, KEY_UNKNOWN }, /* Snapshot */ + { 0x082d, KEY_UNKNOWN }, /* Mouse Cursor */ + { 0x000f, KEY_UNKNOWN }, /* Minimize/Maximize */ + { 0x0814, KEY_SHUFFLE }, /* Shuffle */ + { 0x0025, KEY_POWER }, +}; + +static struct rc_map_list d680_dmb_map = { + .map = { + .scan = rc_map_d680_dmb_table, + .size = ARRAY_SIZE(rc_map_d680_dmb_table), + .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */ + .name = RC_MAP_D680_DMB, + } +}; + +static int __init init_rc_map_d680_dmb(void) +{ + return rc_map_register(&d680_dmb_map); +} + +static void __exit exit_rc_map_d680_dmb(void) +{ + rc_map_unregister(&d680_dmb_map); +} + +module_init(init_rc_map_d680_dmb) +module_exit(exit_rc_map_d680_dmb) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Mauro Carvalho Chehab"); diff --git a/drivers/media/rc/keymaps/rc-dvico-mce.c b/drivers/media/rc/keymaps/rc-dvico-mce.c new file mode 100644 index 000000000000..e5f098c50235 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-dvico-mce.c @@ -0,0 +1,85 @@ +/* + * keymap imported from cxusb.c + * + * Copyright (C) 2016 Sean Young + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2. + */ + +#include +#include + +static struct rc_map_table rc_map_dvico_mce_table[] = { + { 0xfe02, KEY_TV }, + { 0xfe0e, KEY_MP3 }, + { 0xfe1a, KEY_DVD }, + { 0xfe1e, KEY_FAVORITES }, + { 0xfe16, KEY_SETUP }, + { 0xfe46, KEY_POWER2 }, + { 0xfe0a, KEY_EPG }, + { 0xfe49, KEY_BACK }, + { 0xfe4d, KEY_MENU }, + { 0xfe51, KEY_UP }, + { 0xfe5b, KEY_LEFT }, + { 0xfe5f, KEY_RIGHT }, + { 0xfe53, KEY_DOWN }, + { 0xfe5e, KEY_OK }, + { 0xfe59, KEY_INFO }, + { 0xfe55, KEY_TAB }, + { 0xfe0f, KEY_PREVIOUSSONG },/* Replay */ + { 0xfe12, KEY_NEXTSONG }, /* Skip */ + { 0xfe42, KEY_ENTER }, /* Windows/Start */ + { 0xfe15, KEY_VOLUMEUP }, + { 0xfe05, KEY_VOLUMEDOWN }, + { 0xfe11, KEY_CHANNELUP }, + { 0xfe09, KEY_CHANNELDOWN }, + { 0xfe52, KEY_CAMERA }, + { 0xfe5a, KEY_TUNER }, /* Live */ + { 0xfe19, KEY_OPEN }, + { 0xfe0b, KEY_1 }, + { 0xfe17, KEY_2 }, + { 0xfe1b, KEY_3 }, + { 0xfe07, KEY_4 }, + { 0xfe50, KEY_5 }, + { 0xfe54, KEY_6 }, + { 0xfe48, KEY_7 }, + { 0xfe4c, KEY_8 }, + { 0xfe58, KEY_9 }, + { 0xfe13, KEY_ANGLE }, /* Aspect */ + { 0xfe03, KEY_0 }, + { 0xfe1f, KEY_ZOOM }, + { 0xfe43, KEY_REWIND }, + { 0xfe47, KEY_PLAYPAUSE }, + { 0xfe4f, KEY_FASTFORWARD }, + { 0xfe57, KEY_MUTE }, + { 0xfe0d, KEY_STOP }, + { 0xfe01, KEY_RECORD }, + { 0xfe4e, KEY_POWER }, +}; + +static struct rc_map_list dvico_mce_map = { + .map = { + .scan = rc_map_dvico_mce_table, + .size = ARRAY_SIZE(rc_map_dvico_mce_table), + .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */ + .name = RC_MAP_DVICO_MCE, + } +}; + +static int __init init_rc_map_dvico_mce(void) +{ + return rc_map_register(&dvico_mce_map); +} + +static void __exit exit_rc_map_dvico_mce(void) +{ + rc_map_unregister(&dvico_mce_map); +} + +module_init(init_rc_map_dvico_mce) +module_exit(exit_rc_map_dvico_mce) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Mauro Carvalho Chehab"); diff --git a/drivers/media/rc/keymaps/rc-dvico-portable.c b/drivers/media/rc/keymaps/rc-dvico-portable.c new file mode 100644 index 000000000000..94ceeee94b3f --- /dev/null +++ b/drivers/media/rc/keymaps/rc-dvico-portable.c @@ -0,0 +1,76 @@ +/* + * keymap imported from cxusb.c + * + * Copyright (C) 2016 Sean Young + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2. + */ + +#include +#include + +static struct rc_map_table rc_map_dvico_portable_table[] = { + { 0xfc02, KEY_SETUP }, /* Profile */ + { 0xfc43, KEY_POWER2 }, + { 0xfc06, KEY_EPG }, + { 0xfc5a, KEY_BACK }, + { 0xfc05, KEY_MENU }, + { 0xfc47, KEY_INFO }, + { 0xfc01, KEY_TAB }, + { 0xfc42, KEY_PREVIOUSSONG },/* Replay */ + { 0xfc49, KEY_VOLUMEUP }, + { 0xfc09, KEY_VOLUMEDOWN }, + { 0xfc54, KEY_CHANNELUP }, + { 0xfc0b, KEY_CHANNELDOWN }, + { 0xfc16, KEY_CAMERA }, + { 0xfc40, KEY_TUNER }, /* ATV/DTV */ + { 0xfc45, KEY_OPEN }, + { 0xfc19, KEY_1 }, + { 0xfc18, KEY_2 }, + { 0xfc1b, KEY_3 }, + { 0xfc1a, KEY_4 }, + { 0xfc58, KEY_5 }, + { 0xfc59, KEY_6 }, + { 0xfc15, KEY_7 }, + { 0xfc14, KEY_8 }, + { 0xfc17, KEY_9 }, + { 0xfc44, KEY_ANGLE }, /* Aspect */ + { 0xfc55, KEY_0 }, + { 0xfc07, KEY_ZOOM }, + { 0xfc0a, KEY_REWIND }, + { 0xfc08, KEY_PLAYPAUSE }, + { 0xfc4b, KEY_FASTFORWARD }, + { 0xfc5b, KEY_MUTE }, + { 0xfc04, KEY_STOP }, + { 0xfc56, KEY_RECORD }, + { 0xfc57, KEY_POWER }, + { 0xfc41, KEY_UNKNOWN }, /* INPUT */ + { 0xfc00, KEY_UNKNOWN }, /* HD */ +}; + +static struct rc_map_list dvico_portable_map = { + .map = { + .scan = rc_map_dvico_portable_table, + .size = ARRAY_SIZE(rc_map_dvico_portable_table), + .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */ + .name = RC_MAP_DVICO_PORTABLE, + } +}; + +static int __init init_rc_map_dvico_portable(void) +{ + return rc_map_register(&dvico_portable_map); +} + +static void __exit exit_rc_map_dvico_portable(void) +{ + rc_map_unregister(&dvico_portable_map); +} + +module_init(init_rc_map_dvico_portable) +module_exit(exit_rc_map_dvico_portable) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Mauro Carvalho Chehab"); diff --git a/drivers/media/usb/dvb-usb/cxusb.c b/drivers/media/usb/dvb-usb/cxusb.c index 9b8771eb31d4..5d7b4eaa6a3c 100644 --- a/drivers/media/usb/dvb-usb/cxusb.c +++ b/drivers/media/usb/dvb-usb/cxusb.c @@ -450,209 +450,46 @@ static int cxusb_d680_dmb_streaming_ctrl( } } -static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) +static int cxusb_rc_query(struct dvb_usb_device *d) { - struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; u8 ircode[4]; - int i; cxusb_ctrl_msg(d, CMD_GET_IR_CODE, NULL, 0, ircode, 4); - *event = 0; - *state = REMOTE_NO_KEY_PRESSED; - - for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { - if (rc5_custom(&keymap[i]) == ircode[2] && - rc5_data(&keymap[i]) == ircode[3]) { - *event = keymap[i].keycode; - *state = REMOTE_KEY_PRESSED; - - return 0; - } - } - + if (ircode[2] || ircode[3]) + rc_keydown(d->rc_dev, RC_TYPE_UNKNOWN, + RC_SCANCODE_RC5(ircode[2], ircode[3]), 0); return 0; } -static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event, - int *state) +static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d) { - struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; u8 ircode[4]; - int i; struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD, .buf = ircode, .len = 4 }; - *event = 0; - *state = REMOTE_NO_KEY_PRESSED; - if (cxusb_i2c_xfer(&d->i2c_adap, &msg, 1) != 1) return 0; - for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { - if (rc5_custom(&keymap[i]) == ircode[1] && - rc5_data(&keymap[i]) == ircode[2]) { - *event = keymap[i].keycode; - *state = REMOTE_KEY_PRESSED; - - return 0; - } - } - + if (ircode[1] || ircode[2]) + rc_keydown(d->rc_dev, RC_TYPE_UNKNOWN, + RC_SCANCODE_RC5(ircode[1], ircode[2]), 0); return 0; } -static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, - int *state) +static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d) { - struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; u8 ircode[2]; - int i; - - *event = 0; - *state = REMOTE_NO_KEY_PRESSED; if (cxusb_ctrl_msg(d, 0x10, NULL, 0, ircode, 2) < 0) return 0; - for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { - if (rc5_custom(&keymap[i]) == ircode[0] && - rc5_data(&keymap[i]) == ircode[1]) { - *event = keymap[i].keycode; - *state = REMOTE_KEY_PRESSED; - - return 0; - } - } - + if (ircode[0] || ircode[1]) + rc_keydown(d->rc_dev, RC_TYPE_UNKNOWN, + RC_SCANCODE_RC5(ircode[0], ircode[1]), 0); return 0; } -static struct rc_map_table rc_map_dvico_mce_table[] = { - { 0xfe02, KEY_TV }, - { 0xfe0e, KEY_MP3 }, - { 0xfe1a, KEY_DVD }, - { 0xfe1e, KEY_FAVORITES }, - { 0xfe16, KEY_SETUP }, - { 0xfe46, KEY_POWER2 }, - { 0xfe0a, KEY_EPG }, - { 0xfe49, KEY_BACK }, - { 0xfe4d, KEY_MENU }, - { 0xfe51, KEY_UP }, - { 0xfe5b, KEY_LEFT }, - { 0xfe5f, KEY_RIGHT }, - { 0xfe53, KEY_DOWN }, - { 0xfe5e, KEY_OK }, - { 0xfe59, KEY_INFO }, - { 0xfe55, KEY_TAB }, - { 0xfe0f, KEY_PREVIOUSSONG },/* Replay */ - { 0xfe12, KEY_NEXTSONG }, /* Skip */ - { 0xfe42, KEY_ENTER }, /* Windows/Start */ - { 0xfe15, KEY_VOLUMEUP }, - { 0xfe05, KEY_VOLUMEDOWN }, - { 0xfe11, KEY_CHANNELUP }, - { 0xfe09, KEY_CHANNELDOWN }, - { 0xfe52, KEY_CAMERA }, - { 0xfe5a, KEY_TUNER }, /* Live */ - { 0xfe19, KEY_OPEN }, - { 0xfe0b, KEY_1 }, - { 0xfe17, KEY_2 }, - { 0xfe1b, KEY_3 }, - { 0xfe07, KEY_4 }, - { 0xfe50, KEY_5 }, - { 0xfe54, KEY_6 }, - { 0xfe48, KEY_7 }, - { 0xfe4c, KEY_8 }, - { 0xfe58, KEY_9 }, - { 0xfe13, KEY_ANGLE }, /* Aspect */ - { 0xfe03, KEY_0 }, - { 0xfe1f, KEY_ZOOM }, - { 0xfe43, KEY_REWIND }, - { 0xfe47, KEY_PLAYPAUSE }, - { 0xfe4f, KEY_FASTFORWARD }, - { 0xfe57, KEY_MUTE }, - { 0xfe0d, KEY_STOP }, - { 0xfe01, KEY_RECORD }, - { 0xfe4e, KEY_POWER }, -}; - -static struct rc_map_table rc_map_dvico_portable_table[] = { - { 0xfc02, KEY_SETUP }, /* Profile */ - { 0xfc43, KEY_POWER2 }, - { 0xfc06, KEY_EPG }, - { 0xfc5a, KEY_BACK }, - { 0xfc05, KEY_MENU }, - { 0xfc47, KEY_INFO }, - { 0xfc01, KEY_TAB }, - { 0xfc42, KEY_PREVIOUSSONG },/* Replay */ - { 0xfc49, KEY_VOLUMEUP }, - { 0xfc09, KEY_VOLUMEDOWN }, - { 0xfc54, KEY_CHANNELUP }, - { 0xfc0b, KEY_CHANNELDOWN }, - { 0xfc16, KEY_CAMERA }, - { 0xfc40, KEY_TUNER }, /* ATV/DTV */ - { 0xfc45, KEY_OPEN }, - { 0xfc19, KEY_1 }, - { 0xfc18, KEY_2 }, - { 0xfc1b, KEY_3 }, - { 0xfc1a, KEY_4 }, - { 0xfc58, KEY_5 }, - { 0xfc59, KEY_6 }, - { 0xfc15, KEY_7 }, - { 0xfc14, KEY_8 }, - { 0xfc17, KEY_9 }, - { 0xfc44, KEY_ANGLE }, /* Aspect */ - { 0xfc55, KEY_0 }, - { 0xfc07, KEY_ZOOM }, - { 0xfc0a, KEY_REWIND }, - { 0xfc08, KEY_PLAYPAUSE }, - { 0xfc4b, KEY_FASTFORWARD }, - { 0xfc5b, KEY_MUTE }, - { 0xfc04, KEY_STOP }, - { 0xfc56, KEY_RECORD }, - { 0xfc57, KEY_POWER }, - { 0xfc41, KEY_UNKNOWN }, /* INPUT */ - { 0xfc00, KEY_UNKNOWN }, /* HD */ -}; - -static struct rc_map_table rc_map_d680_dmb_table[] = { - { 0x0038, KEY_UNKNOWN }, /* TV/AV */ - { 0x080c, KEY_ZOOM }, - { 0x0800, KEY_0 }, - { 0x0001, KEY_1 }, - { 0x0802, KEY_2 }, - { 0x0003, KEY_3 }, - { 0x0804, KEY_4 }, - { 0x0005, KEY_5 }, - { 0x0806, KEY_6 }, - { 0x0007, KEY_7 }, - { 0x0808, KEY_8 }, - { 0x0009, KEY_9 }, - { 0x000a, KEY_MUTE }, - { 0x0829, KEY_BACK }, - { 0x0012, KEY_CHANNELUP }, - { 0x0813, KEY_CHANNELDOWN }, - { 0x002b, KEY_VOLUMEUP }, - { 0x082c, KEY_VOLUMEDOWN }, - { 0x0020, KEY_UP }, - { 0x0821, KEY_DOWN }, - { 0x0011, KEY_LEFT }, - { 0x0810, KEY_RIGHT }, - { 0x000d, KEY_OK }, - { 0x081f, KEY_RECORD }, - { 0x0017, KEY_PLAYPAUSE }, - { 0x0816, KEY_PLAYPAUSE }, - { 0x000b, KEY_STOP }, - { 0x0827, KEY_FASTFORWARD }, - { 0x0026, KEY_REWIND }, - { 0x081e, KEY_UNKNOWN }, /* Time Shift */ - { 0x000e, KEY_UNKNOWN }, /* Snapshot */ - { 0x082d, KEY_UNKNOWN }, /* Mouse Cursor */ - { 0x000f, KEY_UNKNOWN }, /* Minimize/Maximize */ - { 0x0814, KEY_UNKNOWN }, /* Shuffle */ - { 0x0025, KEY_POWER }, -}; - static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) { static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x28 }; @@ -1000,7 +837,7 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) return -EIO; /* try to determine if there is no IR decoder on the I2C bus */ - for (i = 0; adap->dev->props.rc.legacy.rc_map_table != NULL && i < 5; i++) { + for (i = 0; adap->dev->props.rc.core.rc_codes && i < 5; i++) { msleep(20); if (cxusb_i2c_xfer(&adap->dev->i2c_adap, &msg, 1) != 1) goto no_IR; @@ -1008,7 +845,7 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) continue; if (ircode[2] + ircode[3] != 0xff) { no_IR: - adap->dev->props.rc.legacy.rc_map_table = NULL; + adap->dev->props.rc.core.rc_codes = NULL; info("No IR receiver detected on this device."); break; } @@ -1720,11 +1557,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgh064f_properties = { .i2c_algo = &cxusb_i2c_algo, - .rc.legacy = { - .rc_interval = 100, - .rc_map_table = rc_map_dvico_portable_table, - .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), - .rc_query = cxusb_rc_query, + .rc.core = { + .rc_interval = 100, + .rc_codes = RC_MAP_DVICO_PORTABLE, + .module_name = KBUILD_MODNAME, + .rc_query = cxusb_rc_query, + .allowed_protos = RC_BIT_UNKNOWN, }, .generic_bulk_ctrl_endpoint = 0x01, @@ -1776,11 +1614,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties = { .i2c_algo = &cxusb_i2c_algo, - .rc.legacy = { - .rc_interval = 150, - .rc_map_table = rc_map_dvico_mce_table, - .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), - .rc_query = cxusb_rc_query, + .rc.core = { + .rc_interval = 100, + .rc_codes = RC_MAP_DVICO_MCE, + .module_name = KBUILD_MODNAME, + .rc_query = cxusb_rc_query, + .allowed_protos = RC_BIT_UNKNOWN, }, .generic_bulk_ctrl_endpoint = 0x01, @@ -1840,11 +1679,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties = { .i2c_algo = &cxusb_i2c_algo, - .rc.legacy = { - .rc_interval = 100, - .rc_map_table = rc_map_dvico_portable_table, - .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), - .rc_query = cxusb_rc_query, + .rc.core = { + .rc_interval = 100, + .rc_codes = RC_MAP_DVICO_PORTABLE, + .module_name = KBUILD_MODNAME, + .rc_query = cxusb_rc_query, + .allowed_protos = RC_BIT_UNKNOWN, }, .generic_bulk_ctrl_endpoint = 0x01, @@ -1895,11 +1735,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties = { .i2c_algo = &cxusb_i2c_algo, - .rc.legacy = { - .rc_interval = 100, - .rc_map_table = rc_map_dvico_portable_table, - .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), - .rc_query = cxusb_rc_query, + .rc.core = { + .rc_interval = 100, + .rc_codes = RC_MAP_DVICO_PORTABLE, + .module_name = KBUILD_MODNAME, + .rc_query = cxusb_rc_query, + .allowed_protos = RC_BIT_UNKNOWN, }, .generic_bulk_ctrl_endpoint = 0x01, @@ -1949,11 +1790,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = { .generic_bulk_ctrl_endpoint = 0x01, - .rc.legacy = { - .rc_interval = 100, - .rc_map_table = rc_map_dvico_mce_table, - .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), - .rc_query = cxusb_bluebird2_rc_query, + .rc.core = { + .rc_interval = 100, + .rc_codes = RC_MAP_DVICO_MCE, + .module_name = KBUILD_MODNAME, + .rc_query = cxusb_bluebird2_rc_query, + .allowed_protos = RC_BIT_UNKNOWN, }, .num_device_descs = 1, @@ -2002,11 +1844,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties = { .generic_bulk_ctrl_endpoint = 0x01, - .rc.legacy = { - .rc_interval = 100, - .rc_map_table = rc_map_dvico_portable_table, - .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), - .rc_query = cxusb_bluebird2_rc_query, + .rc.core = { + .rc_interval = 100, + .rc_codes = RC_MAP_DVICO_PORTABLE, + .module_name = KBUILD_MODNAME, + .rc_query = cxusb_bluebird2_rc_query, + .allowed_protos = RC_BIT_UNKNOWN, }, .num_device_descs = 1, @@ -2057,11 +1900,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_prope .generic_bulk_ctrl_endpoint = 0x01, - .rc.legacy = { - .rc_interval = 100, - .rc_map_table = rc_map_dvico_portable_table, - .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), - .rc_query = cxusb_rc_query, + .rc.core = { + .rc_interval = 100, + .rc_codes = RC_MAP_DVICO_PORTABLE, + .module_name = KBUILD_MODNAME, + .rc_query = cxusb_rc_query, + .allowed_protos = RC_BIT_UNKNOWN, }, .num_device_descs = 1, @@ -2155,11 +1999,12 @@ struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties = { .generic_bulk_ctrl_endpoint = 0x01, - .rc.legacy = { - .rc_interval = 100, - .rc_map_table = rc_map_dvico_mce_table, - .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), - .rc_query = cxusb_rc_query, + .rc.core = { + .rc_interval = 100, + .rc_codes = RC_MAP_DVICO_MCE, + .module_name = KBUILD_MODNAME, + .rc_query = cxusb_rc_query, + .allowed_protos = RC_BIT_UNKNOWN, }, .num_device_descs = 1, @@ -2208,11 +2053,12 @@ static struct dvb_usb_device_properties cxusb_d680_dmb_properties = { .generic_bulk_ctrl_endpoint = 0x01, - .rc.legacy = { - .rc_interval = 100, - .rc_map_table = rc_map_d680_dmb_table, - .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table), - .rc_query = cxusb_d680_dmb_rc_query, + .rc.core = { + .rc_interval = 100, + .rc_codes = RC_MAP_D680_DMB, + .module_name = KBUILD_MODNAME, + .rc_query = cxusb_d680_dmb_rc_query, + .allowed_protos = RC_BIT_UNKNOWN, }, .num_device_descs = 1, @@ -2262,11 +2108,12 @@ static struct dvb_usb_device_properties cxusb_mygica_d689_properties = { .generic_bulk_ctrl_endpoint = 0x01, - .rc.legacy = { - .rc_interval = 100, - .rc_map_table = rc_map_d680_dmb_table, - .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table), - .rc_query = cxusb_d680_dmb_rc_query, + .rc.core = { + .rc_interval = 100, + .rc_codes = RC_MAP_D680_DMB, + .module_name = KBUILD_MODNAME, + .rc_query = cxusb_d680_dmb_rc_query, + .allowed_protos = RC_BIT_UNKNOWN, }, .num_device_descs = 1, @@ -2315,11 +2162,12 @@ static struct dvb_usb_device_properties cxusb_mygica_t230_properties = { .generic_bulk_ctrl_endpoint = 0x01, - .rc.legacy = { - .rc_interval = 100, - .rc_map_table = rc_map_d680_dmb_table, - .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table), - .rc_query = cxusb_d680_dmb_rc_query, + .rc.core = { + .rc_interval = 100, + .rc_codes = RC_MAP_D680_DMB, + .module_name = KBUILD_MODNAME, + .rc_query = cxusb_d680_dmb_rc_query, + .allowed_protos = RC_BIT_UNKNOWN, }, .num_device_descs = 1, diff --git a/include/media/rc-map.h b/include/media/rc-map.h index e1cc14cba391..82feb2d35bba 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -198,6 +198,7 @@ struct rc_map *rc_map_get(const char *name); #define RC_MAP_CEC "rc-cec" #define RC_MAP_CINERGY_1400 "rc-cinergy-1400" #define RC_MAP_CINERGY "rc-cinergy" +#define RC_MAP_D680_DMB "rc-d680-dmb" #define RC_MAP_DELOCK_61959 "rc-delock-61959" #define RC_MAP_DIB0700_NEC_TABLE "rc-dib0700-nec" #define RC_MAP_DIB0700_RC5_TABLE "rc-dib0700-rc5" @@ -208,6 +209,8 @@ struct rc_map *rc_map_get(const char *name); #define RC_MAP_DNTV_LIVE_DVB_T "rc-dntv-live-dvb-t" #define RC_MAP_DTT200U "rc-dtt200u" #define RC_MAP_DVBSKY "rc-dvbsky" +#define RC_MAP_DVICO_MCE "rc-dvico-mce" +#define RC_MAP_DVICO_PORTABLE "rc-dvico-portable" #define RC_MAP_EMPTY "rc-empty" #define RC_MAP_EM_TERRATEC "rc-em-terratec" #define RC_MAP_ENCORE_ENLTV2 "rc-encore-enltv2" -- cgit v1.2.3-55-g7522 From 17809ed219945b38a750aa382d1aafe3a9f09b02 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Fri, 2 Dec 2016 15:16:10 -0200 Subject: [media] em28xx: IR protocol not reported correctly Report the correct NEC variant. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/em28xx/em28xx-input.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c index 782ce095c8c5..d1ba2c470645 100644 --- a/drivers/media/usb/em28xx/em28xx-input.c +++ b/drivers/media/usb/em28xx/em28xx-input.c @@ -259,18 +259,21 @@ static int em2874_polling_getkey(struct em28xx_IR *ir, break; case RC_BIT_NEC: - poll_result->protocol = RC_TYPE_RC5; poll_result->scancode = msg[1] << 8 | msg[2]; - if ((msg[3] ^ msg[4]) != 0xff) /* 32 bits NEC */ + if ((msg[3] ^ msg[4]) != 0xff) { /* 32 bits NEC */ + poll_result->protocol = RC_TYPE_NEC32; poll_result->scancode = RC_SCANCODE_NEC32((msg[1] << 24) | (msg[2] << 16) | (msg[3] << 8) | (msg[4])); - else if ((msg[1] ^ msg[2]) != 0xff) /* 24 bits NEC */ + } else if ((msg[1] ^ msg[2]) != 0xff) { /* 24 bits NEC */ + poll_result->protocol = RC_TYPE_NECX; poll_result->scancode = RC_SCANCODE_NECX(msg[1] << 8 | msg[2], msg[3]); - else /* Normal NEC */ + } else { /* Normal NEC */ + poll_result->protocol = RC_TYPE_NEC; poll_result->scancode = RC_SCANCODE_NEC(msg[1], msg[3]); + } break; case RC_BIT_RC6_0: @@ -777,7 +780,7 @@ static int em28xx_ir_init(struct em28xx *dev) case CHIP_ID_EM28178: ir->get_key = em2874_polling_getkey; rc->allowed_protocols = RC_BIT_RC5 | RC_BIT_NEC | - RC_BIT_RC6_0; + RC_BIT_NECX | RC_BIT_NEC32 | RC_BIT_RC6_0; break; default: err = -ENODEV; -- cgit v1.2.3-55-g7522 From 8c34b5c4c82e060de0d8bbf26b978c68bffe5a18 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Sat, 3 Dec 2016 08:55:56 -0200 Subject: [media] rc: raw IR drivers cannot handle cec, unknown or other unknown and other are for IR protocols for which we have no decoder, so the raw IR drivers have no chance of generating them. cec is not an IR protocol. Signed-off-by: Sean Young Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Bruno Prémont Signed-off-by: Mauro Carvalho Chehab --- drivers/hid/hid-picolcd_cir.c | 2 +- drivers/media/common/siano/smsir.c | 2 +- drivers/media/pci/cx23885/cx23885-input.c | 14 +++++++------- drivers/media/rc/ene_ir.c | 2 +- drivers/media/rc/fintek-cir.c | 2 +- drivers/media/rc/gpio-ir-recv.c | 2 +- drivers/media/rc/igorplugusb.c | 4 ++-- drivers/media/rc/iguanair.c | 2 +- drivers/media/rc/ir-hix5hd2.c | 2 +- drivers/media/rc/ite-cir.c | 2 +- drivers/media/rc/mceusb.c | 2 +- drivers/media/rc/meson-ir.c | 2 +- drivers/media/rc/nuvoton-cir.c | 2 +- drivers/media/rc/rc-loopback.c | 2 +- drivers/media/rc/redrat3.c | 2 +- drivers/media/rc/serial_ir.c | 2 +- drivers/media/rc/st_rc.c | 2 +- drivers/media/rc/streamzap.c | 2 +- drivers/media/rc/sunxi-cir.c | 2 +- drivers/media/rc/ttusbir.c | 2 +- drivers/media/rc/winbond-cir.c | 2 +- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 2 +- drivers/media/usb/dvb-usb/technisat-usb2.c | 2 +- include/media/rc-map.h | 10 ++++++++++ 24 files changed, 40 insertions(+), 30 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/hid/hid-picolcd_cir.c b/drivers/hid/hid-picolcd_cir.c index 96286510f42e..90add97cc54d 100644 --- a/drivers/hid/hid-picolcd_cir.c +++ b/drivers/hid/hid-picolcd_cir.c @@ -114,7 +114,7 @@ int picolcd_init_cir(struct picolcd_data *data, struct hid_report *report) rdev->priv = data; rdev->driver_type = RC_DRIVER_IR_RAW; - rdev->allowed_protocols = RC_BIT_ALL; + rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->open = picolcd_cir_open; rdev->close = picolcd_cir_close; rdev->input_name = data->hdev->name; diff --git a/drivers/media/common/siano/smsir.c b/drivers/media/common/siano/smsir.c index 41f2a3939979..480d8bf3d26a 100644 --- a/drivers/media/common/siano/smsir.c +++ b/drivers/media/common/siano/smsir.c @@ -87,7 +87,7 @@ int sms_ir_init(struct smscore_device_t *coredev) dev->priv = coredev; dev->driver_type = RC_DRIVER_IR_RAW; - dev->allowed_protocols = RC_BIT_ALL; + dev->allowed_protocols = RC_BIT_ALL_IR_DECODER; dev->map_name = sms_get_board(board_id)->rc_codes; dev->driver_name = MODULE_NAME; diff --git a/drivers/media/pci/cx23885/cx23885-input.c b/drivers/media/pci/cx23885/cx23885-input.c index 1f092febdbd1..2d4e703b6893 100644 --- a/drivers/media/pci/cx23885/cx23885-input.c +++ b/drivers/media/pci/cx23885/cx23885-input.c @@ -286,28 +286,28 @@ int cx23885_input_init(struct cx23885_dev *dev) case CX23885_BOARD_HAUPPAUGE_HVR1250: /* Integrated CX2388[58] IR controller */ driver_type = RC_DRIVER_IR_RAW; - allowed_protos = RC_BIT_ALL; + allowed_protos = RC_BIT_ALL_IR_DECODER; /* The grey Hauppauge RC-5 remote */ rc_map = RC_MAP_HAUPPAUGE; break; case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL: /* Integrated CX23885 IR controller */ driver_type = RC_DRIVER_IR_RAW; - allowed_protos = RC_BIT_ALL; + allowed_protos = RC_BIT_ALL_IR_DECODER; /* The grey Terratec remote with orange buttons */ rc_map = RC_MAP_NEC_TERRATEC_CINERGY_XS; break; case CX23885_BOARD_TEVII_S470: /* Integrated CX23885 IR controller */ driver_type = RC_DRIVER_IR_RAW; - allowed_protos = RC_BIT_ALL; + allowed_protos = RC_BIT_ALL_IR_DECODER; /* A guess at the remote */ rc_map = RC_MAP_TEVII_NEC; break; case CX23885_BOARD_MYGICA_X8507: /* Integrated CX23885 IR controller */ driver_type = RC_DRIVER_IR_RAW; - allowed_protos = RC_BIT_ALL; + allowed_protos = RC_BIT_ALL_IR_DECODER; /* A guess at the remote */ rc_map = RC_MAP_TOTAL_MEDIA_IN_HAND_02; break; @@ -315,7 +315,7 @@ int cx23885_input_init(struct cx23885_dev *dev) case CX23885_BOARD_TBS_6981: /* Integrated CX23885 IR controller */ driver_type = RC_DRIVER_IR_RAW; - allowed_protos = RC_BIT_ALL; + allowed_protos = RC_BIT_ALL_IR_DECODER; /* A guess at the remote */ rc_map = RC_MAP_TBS_NEC; break; @@ -327,13 +327,13 @@ int cx23885_input_init(struct cx23885_dev *dev) case CX23885_BOARD_DVBSKY_T982: /* Integrated CX23885 IR controller */ driver_type = RC_DRIVER_IR_RAW; - allowed_protos = RC_BIT_ALL; + allowed_protos = RC_BIT_ALL_IR_DECODER; rc_map = RC_MAP_DVBSKY; break; case CX23885_BOARD_TT_CT2_4500_CI: /* Integrated CX23885 IR controller */ driver_type = RC_DRIVER_IR_RAW; - allowed_protos = RC_BIT_ALL; + allowed_protos = RC_BIT_ALL_IR_DECODER; rc_map = RC_MAP_TT_1500; break; default: diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c index ce3cb81902ca..fbfefb7a5f7d 100644 --- a/drivers/media/rc/ene_ir.c +++ b/drivers/media/rc/ene_ir.c @@ -1054,7 +1054,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id) learning_mode_force = false; rdev->driver_type = RC_DRIVER_IR_RAW; - rdev->allowed_protocols = RC_BIT_ALL; + rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->priv = dev; rdev->open = ene_open; rdev->close = ene_close; diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c index 308efec57cc1..b391b2f8ab79 100644 --- a/drivers/media/rc/fintek-cir.c +++ b/drivers/media/rc/fintek-cir.c @@ -530,7 +530,7 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id /* Set up the rc device */ rdev->priv = fintek; rdev->driver_type = RC_DRIVER_IR_RAW; - rdev->allowed_protocols = RC_BIT_ALL; + rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->open = fintek_open; rdev->close = fintek_close; rdev->input_name = FINTEK_DESCRIPTION; diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c index 5b63b1f15cb1..0b5aec4b9c9d 100644 --- a/drivers/media/rc/gpio-ir-recv.c +++ b/drivers/media/rc/gpio-ir-recv.c @@ -165,7 +165,7 @@ static int gpio_ir_recv_probe(struct platform_device *pdev) if (pdata->allowed_protos) rcdev->allowed_protocols = pdata->allowed_protos; else - rcdev->allowed_protocols = RC_BIT_ALL; + rcdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rcdev->map_name = pdata->map_name ?: RC_MAP_EMPTY; gpio_dev->rcdev = rcdev; diff --git a/drivers/media/rc/igorplugusb.c b/drivers/media/rc/igorplugusb.c index 5cf983be07a2..4c4827c3408b 100644 --- a/drivers/media/rc/igorplugusb.c +++ b/drivers/media/rc/igorplugusb.c @@ -203,8 +203,8 @@ static int igorplugusb_probe(struct usb_interface *intf, * This device can only store 36 pulses + spaces, which is not enough * for the NEC protocol and many others. */ - rc->allowed_protocols = RC_BIT_ALL & ~(RC_BIT_NEC | RC_BIT_NECX | - RC_BIT_NEC32 | RC_BIT_RC6_6A_20 | + rc->allowed_protocols = RC_BIT_ALL_IR_DECODER & ~(RC_BIT_NEC | + RC_BIT_NECX | RC_BIT_NEC32 | RC_BIT_RC6_6A_20 | RC_BIT_RC6_6A_24 | RC_BIT_RC6_6A_32 | RC_BIT_RC6_MCE | RC_BIT_SONY20 | RC_BIT_MCE_KBD | RC_BIT_SANYO); diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index 9554585df8b8..75e1dfb1be26 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -491,7 +491,7 @@ static int iguanair_probe(struct usb_interface *intf, usb_to_input_id(ir->udev, &rc->input_id); rc->dev.parent = &intf->dev; rc->driver_type = RC_DRIVER_IR_RAW; - rc->allowed_protocols = RC_BIT_ALL; + rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; rc->priv = ir; rc->open = iguanair_open; rc->close = iguanair_close; diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c index d26907e684dc..d95056ad26dc 100644 --- a/drivers/media/rc/ir-hix5hd2.c +++ b/drivers/media/rc/ir-hix5hd2.c @@ -243,7 +243,7 @@ static int hix5hd2_ir_probe(struct platform_device *pdev) priv->rate = clk_get_rate(priv->clock); rdev->driver_type = RC_DRIVER_IR_RAW; - rdev->allowed_protocols = RC_BIT_ALL; + rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->priv = priv; rdev->open = hix5hd2_ir_open; rdev->close = hix5hd2_ir_close; diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index b955a79608e0..3bffc169b31e 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c @@ -1557,7 +1557,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id /* set up ir-core props */ rdev->priv = itdev; rdev->driver_type = RC_DRIVER_IR_RAW; - rdev->allowed_protocols = RC_BIT_ALL; + rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->open = ite_open; rdev->close = ite_close; rdev->s_idle = ite_s_idle; diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index b814ead58e0e..85b220435ff5 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -1198,7 +1198,7 @@ static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir) rc->dev.parent = dev; rc->priv = ir; rc->driver_type = RC_DRIVER_IR_RAW; - rc->allowed_protocols = RC_BIT_ALL; + rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; rc->timeout = MS_TO_NS(100); if (!ir->flags.no_tx) { rc->s_tx_mask = mceusb_set_tx_mask; diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c index 7eb3f4f1ddcd..3e96e6f1b0c5 100644 --- a/drivers/media/rc/meson-ir.c +++ b/drivers/media/rc/meson-ir.c @@ -145,7 +145,7 @@ static int meson_ir_probe(struct platform_device *pdev) ir->rc->map_name = map_name ? map_name : RC_MAP_EMPTY; ir->rc->dev.parent = dev; ir->rc->driver_type = RC_DRIVER_IR_RAW; - ir->rc->allowed_protocols = RC_BIT_ALL; + ir->rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; ir->rc->rx_resolution = US_TO_NS(MESON_TRATE); ir->rc->timeout = MS_TO_NS(200); ir->rc->driver_name = DRIVER_NAME; diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index 0f7e2b4d3bee..77c05145c04e 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -1057,7 +1057,7 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) /* Set up the rc device */ rdev->priv = nvt; rdev->driver_type = RC_DRIVER_IR_RAW; - rdev->allowed_protocols = RC_BIT_ALL; + rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->open = nvt_open; rdev->close = nvt_close; rdev->tx_ir = nvt_tx_ir; diff --git a/drivers/media/rc/rc-loopback.c b/drivers/media/rc/rc-loopback.c index 698927b3b039..06dd97d4b7cd 100644 --- a/drivers/media/rc/rc-loopback.c +++ b/drivers/media/rc/rc-loopback.c @@ -191,7 +191,7 @@ static int __init loop_init(void) rc->map_name = RC_MAP_EMPTY; rc->priv = &loopdev; rc->driver_type = RC_DRIVER_IR_RAW; - rc->allowed_protocols = RC_BIT_ALL; + rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; rc->timeout = 100 * 1000 * 1000; /* 100 ms */ rc->min_timeout = 1; rc->max_timeout = UINT_MAX; diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 06bea6c00620..4ab0ea02a309 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c @@ -957,7 +957,7 @@ static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3) rc->dev.parent = dev; rc->priv = rr3; rc->driver_type = RC_DRIVER_IR_RAW; - rc->allowed_protocols = RC_BIT_ALL; + rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; rc->min_timeout = MS_TO_NS(RR3_RX_MIN_TIMEOUT); rc->max_timeout = MS_TO_NS(RR3_RX_MAX_TIMEOUT); rc->timeout = US_TO_NS(redrat3_get_timeout(rr3)); diff --git a/drivers/media/rc/serial_ir.c b/drivers/media/rc/serial_ir.c index 2cb6471641bd..408594ea896c 100644 --- a/drivers/media/rc/serial_ir.c +++ b/drivers/media/rc/serial_ir.c @@ -797,7 +797,7 @@ static int __init serial_ir_init_module(void) rcdev->close = serial_ir_close; rcdev->dev.parent = &serial_ir.pdev->dev; rcdev->driver_type = RC_DRIVER_IR_RAW; - rcdev->allowed_protocols = RC_BIT_ALL; + rcdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rcdev->driver_name = KBUILD_MODNAME; rcdev->map_name = RC_MAP_RC6_MCE; rcdev->min_timeout = 1; diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c index 1fa0c9d1c508..80a46e7a779f 100644 --- a/drivers/media/rc/st_rc.c +++ b/drivers/media/rc/st_rc.c @@ -291,7 +291,7 @@ static int st_rc_probe(struct platform_device *pdev) st_rc_hardware_init(rc_dev); rdev->driver_type = RC_DRIVER_IR_RAW; - rdev->allowed_protocols = RC_BIT_ALL; + rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; /* rx sampling rate is 10Mhz */ rdev->rx_resolution = 100; rdev->timeout = US_TO_NS(MAX_SYMB_TIME); diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c index 26f6076ae584..f6391dd6e29f 100644 --- a/drivers/media/rc/streamzap.c +++ b/drivers/media/rc/streamzap.c @@ -305,7 +305,7 @@ static struct rc_dev *streamzap_init_rc_dev(struct streamzap_ir *sz) rdev->dev.parent = dev; rdev->priv = sz; rdev->driver_type = RC_DRIVER_IR_RAW; - rdev->allowed_protocols = RC_BIT_ALL; + rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->driver_name = DRIVER_NAME; rdev->map_name = RC_MAP_STREAMZAP; diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c index eaadc081760a..42bca8d7b451 100644 --- a/drivers/media/rc/sunxi-cir.c +++ b/drivers/media/rc/sunxi-cir.c @@ -230,7 +230,7 @@ static int sunxi_ir_probe(struct platform_device *pdev) ir->rc->map_name = ir->map_name ?: RC_MAP_EMPTY; ir->rc->dev.parent = dev; ir->rc->driver_type = RC_DRIVER_IR_RAW; - ir->rc->allowed_protocols = RC_BIT_ALL; + ir->rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; ir->rc->rx_resolution = SUNXI_IR_SAMPLE; ir->rc->timeout = MS_TO_NS(SUNXI_IR_TIMEOUT); ir->rc->driver_name = SUNXI_IR_DEV; diff --git a/drivers/media/rc/ttusbir.c b/drivers/media/rc/ttusbir.c index bc7c091d6572..cf70e0403294 100644 --- a/drivers/media/rc/ttusbir.c +++ b/drivers/media/rc/ttusbir.c @@ -314,7 +314,7 @@ static int ttusbir_probe(struct usb_interface *intf, usb_to_input_id(tt->udev, &rc->input_id); rc->dev.parent = &intf->dev; rc->driver_type = RC_DRIVER_IR_RAW; - rc->allowed_protocols = RC_BIT_ALL; + rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; rc->priv = tt; rc->driver_name = DRIVER_NAME; rc->map_name = RC_MAP_TT_1500; diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index 38eae9ebef6a..068e81a78125 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c @@ -1085,7 +1085,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) data->dev->dev.parent = &device->dev; data->dev->timeout = MS_TO_NS(100); data->dev->rx_resolution = US_TO_NS(2); - data->dev->allowed_protocols = RC_BIT_ALL; + data->dev->allowed_protocols = RC_BIT_ALL_IR_DECODER; data->dev->allowed_wakeup_protocols = RC_BIT_NEC | RC_BIT_NECX | RC_BIT_NEC32 | RC_BIT_RC5 | RC_BIT_RC6_0 | RC_BIT_RC6_6A_20 | RC_BIT_RC6_6A_24 | diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c index c583c638e468..e16ca07acf1d 100644 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c @@ -1778,7 +1778,7 @@ static int rtl2832u_get_rc_config(struct dvb_usb_device *d, /* load empty to enable rc */ if (!rc->map_name) rc->map_name = RC_MAP_EMPTY; - rc->allowed_protos = RC_BIT_ALL; + rc->allowed_protos = RC_BIT_ALL_IR_DECODER; rc->driver_type = RC_DRIVER_IR_RAW; rc->query = rtl2832u_rc_query; rc->interval = 200; diff --git a/drivers/media/usb/dvb-usb/technisat-usb2.c b/drivers/media/usb/dvb-usb/technisat-usb2.c index 134e7436d56b..9f7dd1afcb15 100644 --- a/drivers/media/usb/dvb-usb/technisat-usb2.c +++ b/drivers/media/usb/dvb-usb/technisat-usb2.c @@ -749,7 +749,7 @@ static struct dvb_usb_device_properties technisat_usb2_devices = { .rc_codes = RC_MAP_TECHNISAT_USB2, .module_name = "technisat-usb2", .rc_query = technisat_usb2_rc_query, - .allowed_protos = RC_BIT_ALL, + .allowed_protos = RC_BIT_ALL_IR_DECODER, .driver_type = RC_DRIVER_IR_RAW, } }; diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 4bd091414551..40f36b8f762a 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -95,6 +95,16 @@ enum rc_type { RC_BIT_RC6_6A_20 | RC_BIT_RC6_6A_24 | \ RC_BIT_RC6_6A_32 | RC_BIT_RC6_MCE | RC_BIT_SHARP | \ RC_BIT_XMP | RC_BIT_CEC) +/* All rc protocols for which we have decoders */ +#define RC_BIT_ALL_IR_DECODER \ + (RC_BIT_RC5 | RC_BIT_RC5X_20 | RC_BIT_RC5_SZ | \ + RC_BIT_JVC | \ + RC_BIT_SONY12 | RC_BIT_SONY15 | RC_BIT_SONY20 | \ + RC_BIT_NEC | RC_BIT_NECX | RC_BIT_NEC32 | \ + RC_BIT_SANYO | RC_BIT_MCE_KBD | RC_BIT_RC6_0 | \ + RC_BIT_RC6_6A_20 | RC_BIT_RC6_6A_24 | \ + RC_BIT_RC6_6A_32 | RC_BIT_RC6_MCE | RC_BIT_SHARP | \ + RC_BIT_XMP) #define RC_SCANCODE_UNKNOWN(x) (x) -- cgit v1.2.3-55-g7522 From 0f7499fddb153a333dff3c1dc4280c178b9b5a80 Mon Sep 17 00:00:00 2001 From: Andi Shyti Date: Fri, 16 Dec 2016 06:50:58 -0200 Subject: [media] rc-main: assign driver type during allocation The driver type can be assigned immediately when an RC device requests to the framework to allocate the device. This is an 'enum rc_driver_type' data type and specifies whether the device is a raw receiver or scancode receiver. The type will be given as parameter to the rc_allocate_device device. Change accordingly all the drivers calling rc_allocate_device() so that the device type is specified during the rc device allocation. Whenever the device type is not specified, it will be set as RC_DRIVER_SCANCODE which was the default '0' value. Suggested-by: Sean Young Signed-off-by: Andi Shyti Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- drivers/hid/hid-picolcd_cir.c | 3 +-- drivers/media/cec/cec-core.c | 3 +-- drivers/media/common/siano/smsir.c | 3 +-- drivers/media/i2c/ir-kbd-i2c.c | 2 +- drivers/media/pci/bt8xx/bttv-input.c | 2 +- drivers/media/pci/cx23885/cx23885-input.c | 11 +---------- drivers/media/pci/cx88/cx88-input.c | 3 +-- drivers/media/pci/dm1105/dm1105.c | 3 +-- drivers/media/pci/mantis/mantis_input.c | 2 +- drivers/media/pci/saa7134/saa7134-input.c | 2 +- drivers/media/pci/smipcie/smipcie-ir.c | 3 +-- drivers/media/pci/ttpci/budget-ci.c | 2 +- drivers/media/rc/ati_remote.c | 3 +-- drivers/media/rc/ene_ir.c | 3 +-- drivers/media/rc/fintek-cir.c | 3 +-- drivers/media/rc/gpio-ir-recv.c | 3 +-- drivers/media/rc/igorplugusb.c | 3 +-- drivers/media/rc/iguanair.c | 3 +-- drivers/media/rc/img-ir/img-ir-hw.c | 2 +- drivers/media/rc/img-ir/img-ir-raw.c | 3 +-- drivers/media/rc/imon.c | 3 +-- drivers/media/rc/ir-hix5hd2.c | 3 +-- drivers/media/rc/ite-cir.c | 3 +-- drivers/media/rc/mceusb.c | 3 +-- drivers/media/rc/meson-ir.c | 3 +-- drivers/media/rc/nuvoton-cir.c | 3 +-- drivers/media/rc/rc-loopback.c | 3 +-- drivers/media/rc/rc-main.c | 9 ++++++--- drivers/media/rc/redrat3.c | 3 +-- drivers/media/rc/serial_ir.c | 3 +-- drivers/media/rc/st_rc.c | 3 +-- drivers/media/rc/streamzap.c | 3 +-- drivers/media/rc/sunxi-cir.c | 3 +-- drivers/media/rc/ttusbir.c | 3 +-- drivers/media/rc/winbond-cir.c | 3 +-- drivers/media/usb/au0828/au0828-input.c | 3 +-- drivers/media/usb/cx231xx/cx231xx-input.c | 2 +- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 3 +-- drivers/media/usb/dvb-usb/dvb-usb-remote.c | 3 +-- drivers/media/usb/em28xx/em28xx-input.c | 2 +- drivers/media/usb/tm6000/tm6000-input.c | 3 +-- include/media/rc-core.h | 6 ++++-- 42 files changed, 50 insertions(+), 85 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/hid/hid-picolcd_cir.c b/drivers/hid/hid-picolcd_cir.c index 90add97cc54d..8ffbb6f65a65 100644 --- a/drivers/hid/hid-picolcd_cir.c +++ b/drivers/hid/hid-picolcd_cir.c @@ -108,12 +108,11 @@ int picolcd_init_cir(struct picolcd_data *data, struct hid_report *report) struct rc_dev *rdev; int ret = 0; - rdev = rc_allocate_device(); + rdev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rdev) return -ENOMEM; rdev->priv = data; - rdev->driver_type = RC_DRIVER_IR_RAW; rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->open = picolcd_cir_open; rdev->close = picolcd_cir_close; diff --git a/drivers/media/cec/cec-core.c b/drivers/media/cec/cec-core.c index aca3ab83a8a1..37217e205040 100644 --- a/drivers/media/cec/cec-core.c +++ b/drivers/media/cec/cec-core.c @@ -239,7 +239,7 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, #if IS_REACHABLE(CONFIG_RC_CORE) /* Prepare the RC input device */ - adap->rc = rc_allocate_device(); + adap->rc = rc_allocate_device(RC_DRIVER_SCANCODE); if (!adap->rc) { pr_err("cec-%s: failed to allocate memory for rc_dev\n", name); @@ -259,7 +259,6 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, adap->rc->input_id.vendor = 0; adap->rc->input_id.product = 0; adap->rc->input_id.version = 1; - adap->rc->driver_type = RC_DRIVER_SCANCODE; adap->rc->driver_name = CEC_NAME; adap->rc->allowed_protocols = RC_BIT_CEC; adap->rc->priv = adap; diff --git a/drivers/media/common/siano/smsir.c b/drivers/media/common/siano/smsir.c index 480d8bf3d26a..7c898b06d85c 100644 --- a/drivers/media/common/siano/smsir.c +++ b/drivers/media/common/siano/smsir.c @@ -58,7 +58,7 @@ int sms_ir_init(struct smscore_device_t *coredev) struct rc_dev *dev; pr_debug("Allocating rc device\n"); - dev = rc_allocate_device(); + dev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!dev) return -ENOMEM; @@ -86,7 +86,6 @@ int sms_ir_init(struct smscore_device_t *coredev) #endif dev->priv = coredev; - dev->driver_type = RC_DRIVER_IR_RAW; dev->allowed_protocols = RC_BIT_ALL_IR_DECODER; dev->map_name = sms_get_board(board_id)->rc_codes; dev->driver_name = MODULE_NAME; diff --git a/drivers/media/i2c/ir-kbd-i2c.c b/drivers/media/i2c/ir-kbd-i2c.c index b2f39a2c0b6d..cee7fd9cf08b 100644 --- a/drivers/media/i2c/ir-kbd-i2c.c +++ b/drivers/media/i2c/ir-kbd-i2c.c @@ -424,7 +424,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) * If platform_data doesn't specify rc_dev, initialize it * internally */ - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_SCANCODE); if (!rc) return -ENOMEM; } diff --git a/drivers/media/pci/bt8xx/bttv-input.c b/drivers/media/pci/bt8xx/bttv-input.c index 57d26a78d410..2fd07a8afcd2 100644 --- a/drivers/media/pci/bt8xx/bttv-input.c +++ b/drivers/media/pci/bt8xx/bttv-input.c @@ -420,7 +420,7 @@ int bttv_input_init(struct bttv *btv) return -ENODEV; ir = kzalloc(sizeof(*ir),GFP_KERNEL); - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_SCANCODE); if (!ir || !rc) goto err_out_free; diff --git a/drivers/media/pci/cx23885/cx23885-input.c b/drivers/media/pci/cx23885/cx23885-input.c index 2d4e703b6893..4367cb3162b6 100644 --- a/drivers/media/pci/cx23885/cx23885-input.c +++ b/drivers/media/pci/cx23885/cx23885-input.c @@ -267,7 +267,6 @@ int cx23885_input_init(struct cx23885_dev *dev) struct cx23885_kernel_ir *kernel_ir; struct rc_dev *rc; char *rc_map; - enum rc_driver_type driver_type; u64 allowed_protos; int ret; @@ -285,28 +284,24 @@ int cx23885_input_init(struct cx23885_dev *dev) case CX23885_BOARD_HAUPPAUGE_HVR1290: case CX23885_BOARD_HAUPPAUGE_HVR1250: /* Integrated CX2388[58] IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; /* The grey Hauppauge RC-5 remote */ rc_map = RC_MAP_HAUPPAUGE; break; case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; /* The grey Terratec remote with orange buttons */ rc_map = RC_MAP_NEC_TERRATEC_CINERGY_XS; break; case CX23885_BOARD_TEVII_S470: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; /* A guess at the remote */ rc_map = RC_MAP_TEVII_NEC; break; case CX23885_BOARD_MYGICA_X8507: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; /* A guess at the remote */ rc_map = RC_MAP_TOTAL_MEDIA_IN_HAND_02; @@ -314,7 +309,6 @@ int cx23885_input_init(struct cx23885_dev *dev) case CX23885_BOARD_TBS_6980: case CX23885_BOARD_TBS_6981: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; /* A guess at the remote */ rc_map = RC_MAP_TBS_NEC; @@ -326,13 +320,11 @@ int cx23885_input_init(struct cx23885_dev *dev) case CX23885_BOARD_DVBSKY_S952: case CX23885_BOARD_DVBSKY_T982: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; rc_map = RC_MAP_DVBSKY; break; case CX23885_BOARD_TT_CT2_4500_CI: /* Integrated CX23885 IR controller */ - driver_type = RC_DRIVER_IR_RAW; allowed_protos = RC_BIT_ALL_IR_DECODER; rc_map = RC_MAP_TT_1500; break; @@ -352,7 +344,7 @@ int cx23885_input_init(struct cx23885_dev *dev) pci_name(dev->pci)); /* input device */ - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rc) { ret = -ENOMEM; goto err_out_free; @@ -371,7 +363,6 @@ int cx23885_input_init(struct cx23885_dev *dev) rc->input_id.product = dev->pci->device; } rc->dev.parent = &dev->pci->dev; - rc->driver_type = driver_type; rc->allowed_protocols = allowed_protos; rc->priv = kernel_ir; rc->open = cx23885_input_ir_open; diff --git a/drivers/media/pci/cx88/cx88-input.c b/drivers/media/pci/cx88/cx88-input.c index c7b3cb406499..01f2e472a2a0 100644 --- a/drivers/media/pci/cx88/cx88-input.c +++ b/drivers/media/pci/cx88/cx88-input.c @@ -274,7 +274,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) */ ir = kzalloc(sizeof(*ir), GFP_KERNEL); - dev = rc_allocate_device(); + dev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!ir || !dev) goto err_out_free; @@ -484,7 +484,6 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) dev->scancode_mask = hardware_mask; if (ir->sampling) { - dev->driver_type = RC_DRIVER_IR_RAW; dev->timeout = 10 * 1000 * 1000; /* 10 ms */ } else { dev->driver_type = RC_DRIVER_SCANCODE; diff --git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c index 28dc1f8f1a5a..a7724b78fbb4 100644 --- a/drivers/media/pci/dm1105/dm1105.c +++ b/drivers/media/pci/dm1105/dm1105.c @@ -739,7 +739,7 @@ static int dm1105_ir_init(struct dm1105_dev *dm1105) struct rc_dev *dev; int err = -ENOMEM; - dev = rc_allocate_device(); + dev = rc_allocate_device(RC_DRIVER_SCANCODE); if (!dev) return -ENOMEM; @@ -748,7 +748,6 @@ static int dm1105_ir_init(struct dm1105_dev *dm1105) dev->driver_name = MODULE_NAME; dev->map_name = RC_MAP_DM1105_NEC; - dev->driver_type = RC_DRIVER_SCANCODE; dev->input_name = "DVB on-card IR receiver"; dev->input_phys = dm1105->ir.input_phys; dev->input_id.bustype = BUS_PCI; diff --git a/drivers/media/pci/mantis/mantis_input.c b/drivers/media/pci/mantis/mantis_input.c index 7f7f1d4d7bb1..50d10cb7d49d 100644 --- a/drivers/media/pci/mantis/mantis_input.c +++ b/drivers/media/pci/mantis/mantis_input.c @@ -39,7 +39,7 @@ int mantis_input_init(struct mantis_pci *mantis) struct rc_dev *dev; int err; - dev = rc_allocate_device(); + dev = rc_allocate_device(RC_DRIVER_SCANCODE); if (!dev) { dprintk(MANTIS_ERROR, 1, "Remote device allocation failed"); err = -ENOMEM; diff --git a/drivers/media/pci/saa7134/saa7134-input.c b/drivers/media/pci/saa7134/saa7134-input.c index 91b883765ce4..78849c19f68a 100644 --- a/drivers/media/pci/saa7134/saa7134-input.c +++ b/drivers/media/pci/saa7134/saa7134-input.c @@ -842,7 +842,7 @@ int saa7134_input_init1(struct saa7134_dev *dev) } ir = kzalloc(sizeof(*ir), GFP_KERNEL); - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_SCANCODE); if (!ir || !rc) { err = -ENOMEM; goto err_out_free; diff --git a/drivers/media/pci/smipcie/smipcie-ir.c b/drivers/media/pci/smipcie/smipcie-ir.c index 826c7c75e64d..d2730c3fdbae 100644 --- a/drivers/media/pci/smipcie/smipcie-ir.c +++ b/drivers/media/pci/smipcie/smipcie-ir.c @@ -183,7 +183,7 @@ int smi_ir_init(struct smi_dev *dev) struct rc_dev *rc_dev; struct smi_rc *ir = &dev->ir; - rc_dev = rc_allocate_device(); + rc_dev = rc_allocate_device(RC_DRIVER_SCANCODE); if (!rc_dev) return -ENOMEM; @@ -202,7 +202,6 @@ int smi_ir_init(struct smi_dev *dev) rc_dev->input_id.product = dev->pci_dev->subsystem_device; rc_dev->dev.parent = &dev->pci_dev->dev; - rc_dev->driver_type = RC_DRIVER_SCANCODE; rc_dev->map_name = dev->info->rc_map; ir->rc_dev = rc_dev; diff --git a/drivers/media/pci/ttpci/budget-ci.c b/drivers/media/pci/ttpci/budget-ci.c index 919d275b9712..68355484ba7d 100644 --- a/drivers/media/pci/ttpci/budget-ci.c +++ b/drivers/media/pci/ttpci/budget-ci.c @@ -174,7 +174,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci) struct rc_dev *dev; int error; - dev = rc_allocate_device(); + dev = rc_allocate_device(RC_DRIVER_SCANCODE); if (!dev) { printk(KERN_ERR "budget_ci: IR interface initialisation failed\n"); return -ENOMEM; diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c index 2f6699e7adcd..9cf3e69de16a 100644 --- a/drivers/media/rc/ati_remote.c +++ b/drivers/media/rc/ati_remote.c @@ -760,7 +760,6 @@ static void ati_remote_rc_init(struct ati_remote *ati_remote) struct rc_dev *rdev = ati_remote->rdev; rdev->priv = ati_remote; - rdev->driver_type = RC_DRIVER_SCANCODE; rdev->allowed_protocols = RC_BIT_OTHER; rdev->driver_name = "ati_remote"; @@ -847,7 +846,7 @@ static int ati_remote_probe(struct usb_interface *interface, } ati_remote = kzalloc(sizeof (struct ati_remote), GFP_KERNEL); - rc_dev = rc_allocate_device(); + rc_dev = rc_allocate_device(RC_DRIVER_SCANCODE); if (!ati_remote || !rc_dev) goto exit_free_dev_rdev; diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c index fbfefb7a5f7d..60da963f40dc 100644 --- a/drivers/media/rc/ene_ir.c +++ b/drivers/media/rc/ene_ir.c @@ -1007,7 +1007,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id) /* allocate memory */ dev = kzalloc(sizeof(struct ene_device), GFP_KERNEL); - rdev = rc_allocate_device(); + rdev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!dev || !rdev) goto exit_free_dev_rdev; @@ -1053,7 +1053,6 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id) if (!dev->hw_learning_and_tx_capable) learning_mode_force = false; - rdev->driver_type = RC_DRIVER_IR_RAW; rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->priv = dev; rdev->open = ene_open; diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c index b391b2f8ab79..0d3562712f27 100644 --- a/drivers/media/rc/fintek-cir.c +++ b/drivers/media/rc/fintek-cir.c @@ -487,7 +487,7 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id return ret; /* input device for IR remote (and tx) */ - rdev = rc_allocate_device(); + rdev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rdev) goto exit_free_dev_rdev; @@ -529,7 +529,6 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id /* Set up the rc device */ rdev->priv = fintek; - rdev->driver_type = RC_DRIVER_IR_RAW; rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->open = fintek_open; rdev->close = fintek_close; diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c index 0b5aec4b9c9d..4a4895e4d599 100644 --- a/drivers/media/rc/gpio-ir-recv.c +++ b/drivers/media/rc/gpio-ir-recv.c @@ -143,14 +143,13 @@ static int gpio_ir_recv_probe(struct platform_device *pdev) if (!gpio_dev) return -ENOMEM; - rcdev = rc_allocate_device(); + rcdev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rcdev) { rc = -ENOMEM; goto err_allocate_device; } rcdev->priv = gpio_dev; - rcdev->driver_type = RC_DRIVER_IR_RAW; rcdev->input_name = GPIO_IR_DEVICE_NAME; rcdev->input_phys = GPIO_IR_DEVICE_NAME "/input0"; rcdev->input_id.bustype = BUS_HOST; diff --git a/drivers/media/rc/igorplugusb.c b/drivers/media/rc/igorplugusb.c index 4c4827c3408b..0f0ed4ea4d06 100644 --- a/drivers/media/rc/igorplugusb.c +++ b/drivers/media/rc/igorplugusb.c @@ -190,7 +190,7 @@ static int igorplugusb_probe(struct usb_interface *intf, usb_make_path(udev, ir->phys, sizeof(ir->phys)); - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rc) goto fail; @@ -198,7 +198,6 @@ static int igorplugusb_probe(struct usb_interface *intf, rc->input_phys = ir->phys; usb_to_input_id(udev, &rc->input_id); rc->dev.parent = &intf->dev; - rc->driver_type = RC_DRIVER_IR_RAW; /* * This device can only store 36 pulses + spaces, which is not enough * for the NEC protocol and many others. diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index 75e1dfb1be26..ccf24fd7ec1b 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -427,7 +427,7 @@ static int iguanair_probe(struct usb_interface *intf, struct usb_host_interface *idesc; ir = kzalloc(sizeof(*ir), GFP_KERNEL); - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!ir || !rc) { ret = -ENOMEM; goto out; @@ -490,7 +490,6 @@ static int iguanair_probe(struct usb_interface *intf, rc->input_phys = ir->phys; usb_to_input_id(ir->udev, &rc->input_id); rc->dev.parent = &intf->dev; - rc->driver_type = RC_DRIVER_IR_RAW; rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; rc->priv = ir; rc->open = iguanair_open; diff --git a/drivers/media/rc/img-ir/img-ir-hw.c b/drivers/media/rc/img-ir/img-ir-hw.c index 8e2b64135c39..431d33b36fb0 100644 --- a/drivers/media/rc/img-ir/img-ir-hw.c +++ b/drivers/media/rc/img-ir/img-ir-hw.c @@ -1078,7 +1078,7 @@ int img_ir_probe_hw(struct img_ir_priv *priv) } /* Allocate hardware decoder */ - hw->rdev = rdev = rc_allocate_device(); + hw->rdev = rdev = rc_allocate_device(RC_DRIVER_SCANCODE); if (!rdev) { dev_err(priv->dev, "cannot allocate input device\n"); error = -ENOMEM; diff --git a/drivers/media/rc/img-ir/img-ir-raw.c b/drivers/media/rc/img-ir/img-ir-raw.c index 33f37ed87ad2..8d2f8e2006e7 100644 --- a/drivers/media/rc/img-ir/img-ir-raw.c +++ b/drivers/media/rc/img-ir/img-ir-raw.c @@ -110,7 +110,7 @@ int img_ir_probe_raw(struct img_ir_priv *priv) setup_timer(&raw->timer, img_ir_echo_timer, (unsigned long)priv); /* Allocate raw decoder */ - raw->rdev = rdev = rc_allocate_device(); + raw->rdev = rdev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rdev) { dev_err(priv->dev, "cannot allocate raw input device\n"); return -ENOMEM; @@ -118,7 +118,6 @@ int img_ir_probe_raw(struct img_ir_priv *priv) rdev->priv = priv; rdev->map_name = RC_MAP_EMPTY; rdev->input_name = "IMG Infrared Decoder Raw"; - rdev->driver_type = RC_DRIVER_IR_RAW; /* Register raw decoder */ error = rc_register_device(rdev); diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 31ffc6a7b2eb..ef1f33e962b6 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c @@ -1935,7 +1935,7 @@ static struct rc_dev *imon_init_rdev(struct imon_context *ictx) const unsigned char fp_packet[] = { 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88 }; - rdev = rc_allocate_device(); + rdev = rc_allocate_device(RC_DRIVER_SCANCODE); if (!rdev) { dev_err(ictx->dev, "remote control dev allocation failed\n"); goto out; @@ -1953,7 +1953,6 @@ static struct rc_dev *imon_init_rdev(struct imon_context *ictx) rdev->dev.parent = ictx->dev; rdev->priv = ictx; - rdev->driver_type = RC_DRIVER_SCANCODE; rdev->allowed_protocols = RC_BIT_OTHER | RC_BIT_RC6_MCE; /* iMON PAD or MCE */ rdev->change_protocol = imon_ir_change_protocol; rdev->driver_name = MOD_NAME; diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c index d95056ad26dc..50951f686852 100644 --- a/drivers/media/rc/ir-hix5hd2.c +++ b/drivers/media/rc/ir-hix5hd2.c @@ -229,7 +229,7 @@ static int hix5hd2_ir_probe(struct platform_device *pdev) return priv->irq; } - rdev = rc_allocate_device(); + rdev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rdev) return -ENOMEM; @@ -242,7 +242,6 @@ static int hix5hd2_ir_probe(struct platform_device *pdev) clk_prepare_enable(priv->clock); priv->rate = clk_get_rate(priv->clock); - rdev->driver_type = RC_DRIVER_IR_RAW; rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->priv = priv; rdev->open = hix5hd2_ir_open; diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index 3bffc169b31e..e9e4befbbebb 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c @@ -1465,7 +1465,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id return ret; /* input device for IR remote (and tx) */ - rdev = rc_allocate_device(); + rdev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rdev) goto exit_free_dev_rdev; itdev->rdev = rdev; @@ -1556,7 +1556,6 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id /* set up ir-core props */ rdev->priv = itdev; - rdev->driver_type = RC_DRIVER_IR_RAW; rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->open = ite_open; rdev->close = ite_close; diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index 85b220435ff5..238d8eaf7d94 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -1177,7 +1177,7 @@ static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir) struct rc_dev *rc; int ret; - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rc) { dev_err(dev, "remote dev allocation failed"); goto out; @@ -1197,7 +1197,6 @@ static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir) usb_to_input_id(ir->usbdev, &rc->input_id); rc->dev.parent = dev; rc->priv = ir; - rc->driver_type = RC_DRIVER_IR_RAW; rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; rc->timeout = MS_TO_NS(100); if (!ir->flags.no_tx) { diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c index 3e96e6f1b0c5..5576dbd6b1a4 100644 --- a/drivers/media/rc/meson-ir.c +++ b/drivers/media/rc/meson-ir.c @@ -131,7 +131,7 @@ static int meson_ir_probe(struct platform_device *pdev) return ir->irq; } - ir->rc = rc_allocate_device(); + ir->rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!ir->rc) { dev_err(dev, "failed to allocate rc device\n"); return -ENOMEM; @@ -144,7 +144,6 @@ static int meson_ir_probe(struct platform_device *pdev) map_name = of_get_property(node, "linux,rc-map-name", NULL); ir->rc->map_name = map_name ? map_name : RC_MAP_EMPTY; ir->rc->dev.parent = dev; - ir->rc->driver_type = RC_DRIVER_IR_RAW; ir->rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; ir->rc->rx_resolution = US_TO_NS(MESON_TRATE); ir->rc->timeout = MS_TO_NS(200); diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index a849eed43d41..b109f8246b96 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -1062,7 +1062,7 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) return -ENOMEM; /* input device for IR remote (and tx) */ - nvt->rdev = devm_rc_allocate_device(&pdev->dev); + nvt->rdev = devm_rc_allocate_device(&pdev->dev, RC_DRIVER_IR_RAW); if (!nvt->rdev) return -ENOMEM; rdev = nvt->rdev; @@ -1125,7 +1125,6 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) /* Set up the rc device */ rdev->priv = nvt; - rdev->driver_type = RC_DRIVER_IR_RAW; rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->allowed_wakeup_protocols = RC_BIT_ALL_IR_ENCODER; rdev->encode_wakeup = true; diff --git a/drivers/media/rc/rc-loopback.c b/drivers/media/rc/rc-loopback.c index 294c0fdbc5a9..62195af24fbe 100644 --- a/drivers/media/rc/rc-loopback.c +++ b/drivers/media/rc/rc-loopback.c @@ -213,7 +213,7 @@ static int __init loop_init(void) struct rc_dev *rc; int ret; - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rc) { printk(KERN_ERR DRIVER_NAME ": rc_dev allocation failed\n"); return -ENOMEM; @@ -226,7 +226,6 @@ static int __init loop_init(void) rc->driver_name = DRIVER_NAME; rc->map_name = RC_MAP_EMPTY; rc->priv = &loopdev; - rc->driver_type = RC_DRIVER_IR_RAW; rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; rc->allowed_wakeup_protocols = RC_BIT_ALL_IR_ENCODER; rc->encode_wakeup = true; diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index d7a1d8cbdf04..aae9f1fc4254 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -1577,7 +1577,7 @@ static struct device_type rc_dev_type = { .uevent = rc_dev_uevent, }; -struct rc_dev *rc_allocate_device(void) +struct rc_dev *rc_allocate_device(enum rc_driver_type type) { struct rc_dev *dev; @@ -1604,6 +1604,8 @@ struct rc_dev *rc_allocate_device(void) dev->dev.class = &rc_class; device_initialize(&dev->dev); + dev->driver_type = type; + __module_get(THIS_MODULE); return dev; } @@ -1630,7 +1632,8 @@ static void devm_rc_alloc_release(struct device *dev, void *res) rc_free_device(*(struct rc_dev **)res); } -struct rc_dev *devm_rc_allocate_device(struct device *dev) +struct rc_dev *devm_rc_allocate_device(struct device *dev, + enum rc_driver_type type) { struct rc_dev **dr, *rc; @@ -1638,7 +1641,7 @@ struct rc_dev *devm_rc_allocate_device(struct device *dev) if (!dr) return NULL; - rc = rc_allocate_device(); + rc = rc_allocate_device(type); if (!rc) { devres_free(dr); return NULL; diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 4ab0ea02a309..56d43be2756b 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c @@ -941,7 +941,7 @@ static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3) int ret; u16 prod = le16_to_cpu(rr3->udev->descriptor.idProduct); - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rc) return NULL; @@ -956,7 +956,6 @@ static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3) usb_to_input_id(rr3->udev, &rc->input_id); rc->dev.parent = dev; rc->priv = rr3; - rc->driver_type = RC_DRIVER_IR_RAW; rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; rc->min_timeout = MS_TO_NS(RR3_RX_MIN_TIMEOUT); rc->max_timeout = MS_TO_NS(RR3_RX_MAX_TIMEOUT); diff --git a/drivers/media/rc/serial_ir.c b/drivers/media/rc/serial_ir.c index 408594ea896c..923fb2299553 100644 --- a/drivers/media/rc/serial_ir.c +++ b/drivers/media/rc/serial_ir.c @@ -757,7 +757,7 @@ static int __init serial_ir_init_module(void) if (result) return result; - rcdev = devm_rc_allocate_device(&serial_ir.pdev->dev); + rcdev = devm_rc_allocate_device(&serial_ir.pdev->dev, RC_DRIVER_IR_RAW); if (!rcdev) { result = -ENOMEM; goto serial_cleanup; @@ -796,7 +796,6 @@ static int __init serial_ir_init_module(void) rcdev->open = serial_ir_open; rcdev->close = serial_ir_close; rcdev->dev.parent = &serial_ir.pdev->dev; - rcdev->driver_type = RC_DRIVER_IR_RAW; rcdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rcdev->driver_name = KBUILD_MODNAME; rcdev->map_name = RC_MAP_RC6_MCE; diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c index 80a46e7a779f..f0d7190e3919 100644 --- a/drivers/media/rc/st_rc.c +++ b/drivers/media/rc/st_rc.c @@ -235,7 +235,7 @@ static int st_rc_probe(struct platform_device *pdev) if (!rc_dev) return -ENOMEM; - rdev = rc_allocate_device(); + rdev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rdev) return -ENOMEM; @@ -290,7 +290,6 @@ static int st_rc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, rc_dev); st_rc_hardware_init(rc_dev); - rdev->driver_type = RC_DRIVER_IR_RAW; rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; /* rx sampling rate is 10Mhz */ rdev->rx_resolution = 100; diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c index f6391dd6e29f..b09c45abb5f3 100644 --- a/drivers/media/rc/streamzap.c +++ b/drivers/media/rc/streamzap.c @@ -287,7 +287,7 @@ static struct rc_dev *streamzap_init_rc_dev(struct streamzap_ir *sz) struct device *dev = sz->dev; int ret; - rdev = rc_allocate_device(); + rdev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!rdev) { dev_err(dev, "remote dev allocation failed\n"); goto out; @@ -304,7 +304,6 @@ static struct rc_dev *streamzap_init_rc_dev(struct streamzap_ir *sz) usb_to_input_id(sz->usbdev, &rdev->input_id); rdev->dev.parent = dev; rdev->priv = sz; - rdev->driver_type = RC_DRIVER_IR_RAW; rdev->allowed_protocols = RC_BIT_ALL_IR_DECODER; rdev->driver_name = DRIVER_NAME; rdev->map_name = RC_MAP_STREAMZAP; diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c index 42bca8d7b451..25b006167810 100644 --- a/drivers/media/rc/sunxi-cir.c +++ b/drivers/media/rc/sunxi-cir.c @@ -212,7 +212,7 @@ static int sunxi_ir_probe(struct platform_device *pdev) goto exit_clkdisable_clk; } - ir->rc = rc_allocate_device(); + ir->rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!ir->rc) { dev_err(dev, "failed to allocate device\n"); ret = -ENOMEM; @@ -229,7 +229,6 @@ static int sunxi_ir_probe(struct platform_device *pdev) ir->map_name = of_get_property(dn, "linux,rc-map-name", NULL); ir->rc->map_name = ir->map_name ?: RC_MAP_EMPTY; ir->rc->dev.parent = dev; - ir->rc->driver_type = RC_DRIVER_IR_RAW; ir->rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; ir->rc->rx_resolution = SUNXI_IR_SAMPLE; ir->rc->timeout = MS_TO_NS(SUNXI_IR_TIMEOUT); diff --git a/drivers/media/rc/ttusbir.c b/drivers/media/rc/ttusbir.c index cf70e0403294..23be7702e2df 100644 --- a/drivers/media/rc/ttusbir.c +++ b/drivers/media/rc/ttusbir.c @@ -201,7 +201,7 @@ static int ttusbir_probe(struct usb_interface *intf, int altsetting = -1; tt = kzalloc(sizeof(*tt), GFP_KERNEL); - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!tt || !rc) { ret = -ENOMEM; goto out; @@ -313,7 +313,6 @@ static int ttusbir_probe(struct usb_interface *intf, rc->input_phys = tt->phys; usb_to_input_id(tt->udev, &rc->input_id); rc->dev.parent = &intf->dev; - rc->driver_type = RC_DRIVER_IR_RAW; rc->allowed_protocols = RC_BIT_ALL_IR_DECODER; rc->priv = tt; rc->driver_name = DRIVER_NAME; diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index 068e81a78125..dc1c8305ad23 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c @@ -1061,13 +1061,12 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) if (err) goto exit_free_data; - data->dev = rc_allocate_device(); + data->dev = rc_allocate_device(RC_DRIVER_IR_RAW); if (!data->dev) { err = -ENOMEM; goto exit_unregister_led; } - data->dev->driver_type = RC_DRIVER_IR_RAW; data->dev->driver_name = DRVNAME; data->dev->input_name = WBCIR_NAME; data->dev->input_phys = "wbcir/cir0"; diff --git a/drivers/media/usb/au0828/au0828-input.c b/drivers/media/usb/au0828/au0828-input.c index 1e66e7828d8f..9ec919c68482 100644 --- a/drivers/media/usb/au0828/au0828-input.c +++ b/drivers/media/usb/au0828/au0828-input.c @@ -298,7 +298,7 @@ int au0828_rc_register(struct au0828_dev *dev) return -ENODEV; ir = kzalloc(sizeof(*ir), GFP_KERNEL); - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_IR_RAW); if (!ir || !rc) goto error; @@ -343,7 +343,6 @@ int au0828_rc_register(struct au0828_dev *dev) rc->input_id.product = le16_to_cpu(dev->usbdev->descriptor.idProduct); rc->dev.parent = &dev->usbdev->dev; rc->driver_name = "au0828-input"; - rc->driver_type = RC_DRIVER_IR_RAW; rc->allowed_protocols = RC_BIT_NEC | RC_BIT_NECX | RC_BIT_NEC32 | RC_BIT_RC5; diff --git a/drivers/media/usb/cx231xx/cx231xx-input.c b/drivers/media/usb/cx231xx/cx231xx-input.c index 15d8d1b5f05c..6e80f3c573f3 100644 --- a/drivers/media/usb/cx231xx/cx231xx-input.c +++ b/drivers/media/usb/cx231xx/cx231xx-input.c @@ -72,7 +72,7 @@ int cx231xx_ir_init(struct cx231xx *dev) memset(&info, 0, sizeof(struct i2c_board_info)); memset(&dev->init_data, 0, sizeof(dev->init_data)); - dev->init_data.rc_dev = rc_allocate_device(); + dev->init_data.rc_dev = rc_allocate_device(RC_DRIVER_SCANCODE); if (!dev->init_data.rc_dev) return -ENOMEM; diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c index a8e6624fbe83..298c91a6f1f9 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c @@ -147,7 +147,7 @@ static int dvb_usbv2_remote_init(struct dvb_usb_device *d) if (!d->rc.map_name) return 0; - dev = rc_allocate_device(); + dev = rc_allocate_device(d->rc.driver_type); if (!dev) { ret = -ENOMEM; goto err; @@ -162,7 +162,6 @@ static int dvb_usbv2_remote_init(struct dvb_usb_device *d) /* TODO: likely RC-core should took const char * */ dev->driver_name = (char *) d->props->driver_name; dev->map_name = d->rc.map_name; - dev->driver_type = d->rc.driver_type; dev->allowed_protocols = d->rc.allowed_protos; dev->change_protocol = d->rc.change_protocol; dev->priv = d; diff --git a/drivers/media/usb/dvb-usb/dvb-usb-remote.c b/drivers/media/usb/dvb-usb/dvb-usb-remote.c index c259f9e43542..059ded59208e 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb-remote.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-remote.c @@ -265,7 +265,7 @@ static int rc_core_dvb_usb_remote_init(struct dvb_usb_device *d) int err, rc_interval; struct rc_dev *dev; - dev = rc_allocate_device(); + dev = rc_allocate_device(d->props.rc.core.driver_type); if (!dev) return -ENOMEM; @@ -273,7 +273,6 @@ static int rc_core_dvb_usb_remote_init(struct dvb_usb_device *d) dev->map_name = d->props.rc.core.rc_codes; dev->change_protocol = d->props.rc.core.change_protocol; dev->allowed_protocols = d->props.rc.core.allowed_protos; - dev->driver_type = d->props.rc.core.driver_type; usb_to_input_id(d->udev, &dev->input_id); dev->input_name = "IR-receiver inside an USB DVB receiver"; dev->input_phys = d->rc_phys; diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c index d1ba2c470645..eba75736e654 100644 --- a/drivers/media/usb/em28xx/em28xx-input.c +++ b/drivers/media/usb/em28xx/em28xx-input.c @@ -722,7 +722,7 @@ static int em28xx_ir_init(struct em28xx *dev) ir = kzalloc(sizeof(*ir), GFP_KERNEL); if (!ir) return -ENOMEM; - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_SCANCODE); if (!rc) goto error; diff --git a/drivers/media/usb/tm6000/tm6000-input.c b/drivers/media/usb/tm6000/tm6000-input.c index 83d59456680a..ef0dbd9c95f3 100644 --- a/drivers/media/usb/tm6000/tm6000-input.c +++ b/drivers/media/usb/tm6000/tm6000-input.c @@ -425,7 +425,7 @@ int tm6000_ir_init(struct tm6000_core *dev) return 0; ir = kzalloc(sizeof(*ir), GFP_ATOMIC); - rc = rc_allocate_device(); + rc = rc_allocate_device(RC_DRIVER_SCANCODE); if (!ir || !rc) goto out; @@ -452,7 +452,6 @@ int tm6000_ir_init(struct tm6000_core *dev) ir->polling = 50; INIT_DELAYED_WORK(&ir->work, tm6000_ir_handle_key); } - rc->driver_type = RC_DRIVER_SCANCODE; snprintf(ir->name, sizeof(ir->name), "tm5600/60x0 IR (%s)", dev->name); diff --git a/include/media/rc-core.h b/include/media/rc-core.h index cf9fabcee33e..8c2252686955 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h @@ -203,17 +203,19 @@ struct rc_dev { /** * rc_allocate_device - Allocates a RC device * + * @rc_driver_type: specifies the type of the RC output to be allocated * returns a pointer to struct rc_dev. */ -struct rc_dev *rc_allocate_device(void); +struct rc_dev *rc_allocate_device(enum rc_driver_type); /** * devm_rc_allocate_device - Managed RC device allocation * * @dev: pointer to struct device + * @rc_driver_type: specifies the type of the RC output to be allocated * returns a pointer to struct rc_dev. */ -struct rc_dev *devm_rc_allocate_device(struct device *dev); +struct rc_dev *devm_rc_allocate_device(struct device *dev, enum rc_driver_type); /** * rc_free_device - Frees a RC device -- cgit v1.2.3-55-g7522 From 7289cf4acfbfedf725a04e58ec0113927c023f64 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Fri, 30 Dec 2016 12:46:19 -0200 Subject: [media] gp8psk: fix spelling mistake: "firmare" -> "firmware" trivial fix to spelling mistake in err message Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb/gp8psk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb/gp8psk.c b/drivers/media/usb/dvb-usb/gp8psk.c index 2360e7e32b06..26461f2ee428 100644 --- a/drivers/media/usb/dvb-usb/gp8psk.c +++ b/drivers/media/usb/dvb-usb/gp8psk.c @@ -161,7 +161,7 @@ static int gp8psk_load_bcm4500fw(struct dvb_usb_device *d) goto out_free; } if (buflen > 64) { - err("firmare chunk size bigger than 64 bytes."); + err("firmware chunk size bigger than 64 bytes."); goto out_free; } -- cgit v1.2.3-55-g7522 From 1e071039b1535e2a781acc750681deb2eb838565 Mon Sep 17 00:00:00 2001 From: Santosh Kumar Singh Date: Mon, 19 Dec 2016 15:10:58 -0200 Subject: [media] tm6000: Clean up file handle in open() error path Fix to avoid possible memory leak and exit file handle in error paths. Signed-off-by: Santosh Kumar Singh Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/tm6000/tm6000-video.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index 3367a3b72530..c4fdc1fa32ef 100644 --- a/drivers/media/usb/tm6000/tm6000-video.c +++ b/drivers/media/usb/tm6000/tm6000-video.c @@ -1371,8 +1371,11 @@ static int __tm6000_open(struct file *file) /* initialize hardware on analog mode */ rc = tm6000_init_analog_mode(dev); - if (rc < 0) + if (rc < 0) { + v4l2_fh_exit(&fh->fh); + kfree(fh); return rc; + } dev->mode = TM6000_MODE_ANALOG; -- cgit v1.2.3-55-g7522 From 01faa0d9c79e9c6a52d33e01f953588a946e3d87 Mon Sep 17 00:00:00 2001 From: Santosh Kumar Singh Date: Mon, 19 Dec 2016 15:20:37 -0200 Subject: [media] pvrusb2: Clean up file handle in open() error path Fix to avoid possible exit file handle in error paths. Signed-off-by: Santosh Kumar Singh Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index 88283d7229f0..8f13c60198ed 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c @@ -1050,7 +1050,7 @@ static int pvr2_v4l2_open(struct file *file) pvr2_trace(PVR2_TRACE_STRUCT, "Destroying pvr_v4l2_fh id=%p (input mask error)", fhp); - + v4l2_fh_exit(&fhp->fh); kfree(fhp); return ret; } @@ -1067,6 +1067,7 @@ static int pvr2_v4l2_open(struct file *file) pvr2_trace(PVR2_TRACE_STRUCT, "Destroying pvr_v4l2_fh id=%p (input map failure)", fhp); + v4l2_fh_exit(&fhp->fh); kfree(fhp); return -ENOMEM; } -- cgit v1.2.3-55-g7522 From 9945cf9997b5fc10b47c010cdb40b2753ccc77d9 Mon Sep 17 00:00:00 2001 From: Shyam Saini Date: Fri, 23 Dec 2016 17:34:36 -0200 Subject: [media] media: usb: cpia2: Use kmemdup instead of kmalloc and memcpy When some other buffer is immediately copied into allocated region. Replace calls to kmalloc followed by a memcpy with a direct call to kmemdup. Signed-off-by: Shyam Saini Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/cpia2/cpia2_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/cpia2/cpia2_usb.c b/drivers/media/usb/cpia2/cpia2_usb.c index 7a50662348f6..1c7e16e5d88b 100644 --- a/drivers/media/usb/cpia2/cpia2_usb.c +++ b/drivers/media/usb/cpia2/cpia2_usb.c @@ -547,12 +547,10 @@ static int write_packet(struct usb_device *udev, if (!registers || size <= 0) return -EINVAL; - buf = kmalloc(size, GFP_KERNEL); + buf = kmemdup(registers, size, GFP_KERNEL); if (!buf) return -ENOMEM; - memcpy(buf, registers, size); - ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), request, -- cgit v1.2.3-55-g7522 From 16eddbe352e78829111315889b697037d09b26a1 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Thu, 22 Dec 2016 16:26:52 -0200 Subject: [media] pvrusb2-io: Use kmalloc_array() in pvr2_stream_buffer_count() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/pvrusb2/pvrusb2-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/pvrusb2/pvrusb2-io.c b/drivers/media/usb/pvrusb2/pvrusb2-io.c index 2832ddffcc71..aa5c32c678d7 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-io.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-io.c @@ -308,7 +308,8 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt) if (cnt > sp->buffer_total_count) { if (scnt > sp->buffer_slot_count) { struct pvr2_buffer **nb; - nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL); + + nb = kmalloc_array(scnt, sizeof(*nb), GFP_KERNEL); if (!nb) return -ENOMEM; if (sp->buffer_slot_count) { memcpy(nb,sp->buffers, -- cgit v1.2.3-55-g7522 From 7cf8c1000dcda869af75178448013e43d12b7af4 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Thu, 22 Dec 2016 17:25:39 -0200 Subject: [media] pvrusb2-io: Add some spaces for better code readability Use space characters at some source code places according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/pvrusb2/pvrusb2-io.c | 120 ++++++++++++++++----------------- 1 file changed, 60 insertions(+), 60 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/pvrusb2/pvrusb2-io.c b/drivers/media/usb/pvrusb2/pvrusb2-io.c index aa5c32c678d7..6d153fc23ec2 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-io.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-io.c @@ -33,13 +33,13 @@ static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state); if ((bp)->signature != BUFFER_SIG) { \ pvr2_trace(PVR2_TRACE_ERROR_LEGS, \ "Buffer %p is bad at %s:%d", \ - (bp),__FILE__,__LINE__); \ - pvr2_buffer_describe(bp,"BadSig"); \ + (bp), __FILE__, __LINE__); \ + pvr2_buffer_describe(bp, "BadSig"); \ BUG(); \ } \ } while (0) #else -#define BUFFER_CHECK(bp) do {} while(0) +#define BUFFER_CHECK(bp) do {} while (0) #endif struct pvr2_stream { @@ -106,7 +106,7 @@ static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st) } #ifdef SANITY_CHECK_BUFFERS -static void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg) +static void pvr2_buffer_describe(struct pvr2_buffer *bp, const char *msg) { pvr2_trace(PVR2_TRACE_INFO, "buffer%s%s %p state=%s id=%d status=%d stream=%p purb=%p sig=0x%x", @@ -152,7 +152,7 @@ static void pvr2_buffer_remove(struct pvr2_buffer *bp) (*bcnt) -= ccnt; pvr2_trace(PVR2_TRACE_BUF_FLOW, "/*---TRACE_FLOW---*/ bufferPool %8s dec cap=%07d cnt=%02d", - pvr2_buffer_state_decode(bp->state),*bcnt,*cnt); + pvr2_buffer_state_decode(bp->state), *bcnt, *cnt); bp->state = pvr2_buffer_state_none; } @@ -167,9 +167,9 @@ static void pvr2_buffer_set_none(struct pvr2_buffer *bp) bp, pvr2_buffer_state_decode(bp->state), pvr2_buffer_state_decode(pvr2_buffer_state_none)); - spin_lock_irqsave(&sp->list_lock,irq_flags); + spin_lock_irqsave(&sp->list_lock, irq_flags); pvr2_buffer_remove(bp); - spin_unlock_irqrestore(&sp->list_lock,irq_flags); + spin_unlock_irqrestore(&sp->list_lock, irq_flags); } static int pvr2_buffer_set_ready(struct pvr2_buffer *bp) @@ -184,18 +184,18 @@ static int pvr2_buffer_set_ready(struct pvr2_buffer *bp) bp, pvr2_buffer_state_decode(bp->state), pvr2_buffer_state_decode(pvr2_buffer_state_ready)); - spin_lock_irqsave(&sp->list_lock,irq_flags); + spin_lock_irqsave(&sp->list_lock, irq_flags); fl = (sp->r_count == 0); pvr2_buffer_remove(bp); - list_add_tail(&bp->list_overhead,&sp->ready_list); + list_add_tail(&bp->list_overhead, &sp->ready_list); bp->state = pvr2_buffer_state_ready; (sp->r_count)++; sp->r_bcount += bp->used_count; pvr2_trace(PVR2_TRACE_BUF_FLOW, "/*---TRACE_FLOW---*/ bufferPool %8s inc cap=%07d cnt=%02d", pvr2_buffer_state_decode(bp->state), - sp->r_bcount,sp->r_count); - spin_unlock_irqrestore(&sp->list_lock,irq_flags); + sp->r_bcount, sp->r_count); + spin_unlock_irqrestore(&sp->list_lock, irq_flags); return fl; } @@ -210,17 +210,17 @@ static void pvr2_buffer_set_idle(struct pvr2_buffer *bp) bp, pvr2_buffer_state_decode(bp->state), pvr2_buffer_state_decode(pvr2_buffer_state_idle)); - spin_lock_irqsave(&sp->list_lock,irq_flags); + spin_lock_irqsave(&sp->list_lock, irq_flags); pvr2_buffer_remove(bp); - list_add_tail(&bp->list_overhead,&sp->idle_list); + list_add_tail(&bp->list_overhead, &sp->idle_list); bp->state = pvr2_buffer_state_idle; (sp->i_count)++; sp->i_bcount += bp->max_count; pvr2_trace(PVR2_TRACE_BUF_FLOW, "/*---TRACE_FLOW---*/ bufferPool %8s inc cap=%07d cnt=%02d", pvr2_buffer_state_decode(bp->state), - sp->i_bcount,sp->i_count); - spin_unlock_irqrestore(&sp->list_lock,irq_flags); + sp->i_bcount, sp->i_count); + spin_unlock_irqrestore(&sp->list_lock, irq_flags); } static void pvr2_buffer_set_queued(struct pvr2_buffer *bp) @@ -234,17 +234,17 @@ static void pvr2_buffer_set_queued(struct pvr2_buffer *bp) bp, pvr2_buffer_state_decode(bp->state), pvr2_buffer_state_decode(pvr2_buffer_state_queued)); - spin_lock_irqsave(&sp->list_lock,irq_flags); + spin_lock_irqsave(&sp->list_lock, irq_flags); pvr2_buffer_remove(bp); - list_add_tail(&bp->list_overhead,&sp->queued_list); + list_add_tail(&bp->list_overhead, &sp->queued_list); bp->state = pvr2_buffer_state_queued; (sp->q_count)++; sp->q_bcount += bp->max_count; pvr2_trace(PVR2_TRACE_BUF_FLOW, "/*---TRACE_FLOW---*/ bufferPool %8s inc cap=%07d cnt=%02d", pvr2_buffer_state_decode(bp->state), - sp->q_bcount,sp->q_count); - spin_unlock_irqrestore(&sp->list_lock,irq_flags); + sp->q_bcount, sp->q_count); + spin_unlock_irqrestore(&sp->list_lock, irq_flags); } static void pvr2_buffer_wipe(struct pvr2_buffer *bp) @@ -258,18 +258,18 @@ static int pvr2_buffer_init(struct pvr2_buffer *bp, struct pvr2_stream *sp, unsigned int id) { - memset(bp,0,sizeof(*bp)); + memset(bp, 0, sizeof(*bp)); bp->signature = BUFFER_SIG; bp->id = id; pvr2_trace(PVR2_TRACE_BUF_POOL, - "/*---TRACE_FLOW---*/ bufferInit %p stream=%p",bp,sp); + "/*---TRACE_FLOW---*/ bufferInit %p stream=%p", bp, sp); bp->stream = sp; bp->state = pvr2_buffer_state_none; INIT_LIST_HEAD(&bp->list_overhead); - bp->purb = usb_alloc_urb(0,GFP_KERNEL); + bp->purb = usb_alloc_urb(0, GFP_KERNEL); if (! bp->purb) return -ENOMEM; #ifdef SANITY_CHECK_BUFFERS - pvr2_buffer_describe(bp,"create"); + pvr2_buffer_describe(bp, "create"); #endif return 0; } @@ -277,7 +277,7 @@ static int pvr2_buffer_init(struct pvr2_buffer *bp, static void pvr2_buffer_done(struct pvr2_buffer *bp) { #ifdef SANITY_CHECK_BUFFERS - pvr2_buffer_describe(bp,"delete"); + pvr2_buffer_describe(bp, "delete"); #endif pvr2_buffer_wipe(bp); pvr2_buffer_set_none(bp); @@ -288,7 +288,7 @@ static void pvr2_buffer_done(struct pvr2_buffer *bp) bp); } -static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt) +static int pvr2_stream_buffer_count(struct pvr2_stream *sp, unsigned int cnt) { int ret; unsigned int scnt; @@ -312,7 +312,7 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt) nb = kmalloc_array(scnt, sizeof(*nb), GFP_KERNEL); if (!nb) return -ENOMEM; if (sp->buffer_slot_count) { - memcpy(nb,sp->buffers, + memcpy(nb, sp->buffers, sp->buffer_slot_count * sizeof(*nb)); kfree(sp->buffers); } @@ -321,9 +321,9 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt) } while (sp->buffer_total_count < cnt) { struct pvr2_buffer *bp; - bp = kmalloc(sizeof(*bp),GFP_KERNEL); + bp = kmalloc(sizeof(*bp), GFP_KERNEL); if (!bp) return -ENOMEM; - ret = pvr2_buffer_init(bp,sp,sp->buffer_total_count); + ret = pvr2_buffer_init(bp, sp, sp->buffer_total_count); if (ret) { kfree(bp); return -ENOMEM; @@ -366,10 +366,10 @@ static int pvr2_stream_achieve_buffer_count(struct pvr2_stream *sp) pvr2_trace(PVR2_TRACE_BUF_POOL, "/*---TRACE_FLOW---*/ poolCheck stream=%p cur=%d tgt=%d", - sp,sp->buffer_total_count,sp->buffer_target_count); + sp, sp->buffer_total_count, sp->buffer_target_count); if (sp->buffer_total_count < sp->buffer_target_count) { - return pvr2_stream_buffer_count(sp,sp->buffer_target_count); + return pvr2_stream_buffer_count(sp, sp->buffer_target_count); } cnt = 0; @@ -379,7 +379,7 @@ static int pvr2_stream_achieve_buffer_count(struct pvr2_stream *sp) cnt++; } if (cnt) { - pvr2_stream_buffer_count(sp,sp->buffer_total_count - cnt); + pvr2_stream_buffer_count(sp, sp->buffer_total_count - cnt); } return 0; @@ -390,7 +390,7 @@ static void pvr2_stream_internal_flush(struct pvr2_stream *sp) struct list_head *lp; struct pvr2_buffer *bp1; while ((lp = sp->queued_list.next) != &sp->queued_list) { - bp1 = list_entry(lp,struct pvr2_buffer,list_overhead); + bp1 = list_entry(lp, struct pvr2_buffer, list_overhead); pvr2_buffer_wipe(bp1); /* At this point, we should be guaranteed that no completion callback may happen on this buffer. But it's @@ -418,7 +418,7 @@ static void pvr2_stream_done(struct pvr2_stream *sp) { mutex_lock(&sp->mutex); do { pvr2_stream_internal_flush(sp); - pvr2_stream_buffer_count(sp,0); + pvr2_stream_buffer_count(sp, 0); } while (0); mutex_unlock(&sp->mutex); } @@ -433,8 +433,8 @@ static void buffer_complete(struct urb *urb) bp->status = 0; pvr2_trace(PVR2_TRACE_BUF_FLOW, "/*---TRACE_FLOW---*/ bufferComplete %p stat=%d cnt=%d", - bp,urb->status,urb->actual_length); - spin_lock_irqsave(&sp->list_lock,irq_flags); + bp, urb->status, urb->actual_length); + spin_lock_irqsave(&sp->list_lock, irq_flags); if ((!(urb->status)) || (urb->status == -ENOENT) || (urb->status == -ECONNRESET) || @@ -455,12 +455,12 @@ static void buffer_complete(struct urb *urb) (sp->buffers_failed)++; pvr2_trace(PVR2_TRACE_TOLERANCE, "stream %p ignoring error %d - fail count increased to %u", - sp,urb->status,sp->fail_count); + sp, urb->status, sp->fail_count); } else { (sp->buffers_failed)++; bp->status = urb->status; } - spin_unlock_irqrestore(&sp->list_lock,irq_flags); + spin_unlock_irqrestore(&sp->list_lock, irq_flags); pvr2_buffer_set_ready(bp); if (sp->callback_func) { sp->callback_func(sp->callback_data); @@ -470,9 +470,9 @@ static void buffer_complete(struct urb *urb) struct pvr2_stream *pvr2_stream_create(void) { struct pvr2_stream *sp; - sp = kzalloc(sizeof(*sp),GFP_KERNEL); + sp = kzalloc(sizeof(*sp), GFP_KERNEL); if (!sp) return sp; - pvr2_trace(PVR2_TRACE_INIT,"pvr2_stream_create: sp=%p",sp); + pvr2_trace(PVR2_TRACE_INIT, "pvr2_stream_create: sp=%p", sp); pvr2_stream_init(sp); return sp; } @@ -480,7 +480,7 @@ struct pvr2_stream *pvr2_stream_create(void) void pvr2_stream_destroy(struct pvr2_stream *sp) { if (!sp) return; - pvr2_trace(PVR2_TRACE_INIT,"pvr2_stream_destroy: sp=%p",sp); + pvr2_trace(PVR2_TRACE_INIT, "pvr2_stream_destroy: sp=%p", sp); pvr2_stream_done(sp); kfree(sp); } @@ -495,7 +495,7 @@ void pvr2_stream_setup(struct pvr2_stream *sp, sp->dev = dev; sp->endpoint = endpoint; sp->fail_tolerance = tolerance; - } while(0); mutex_unlock(&sp->mutex); + } while (0); mutex_unlock(&sp->mutex); } void pvr2_stream_set_callback(struct pvr2_stream *sp, @@ -505,11 +505,11 @@ void pvr2_stream_set_callback(struct pvr2_stream *sp, unsigned long irq_flags; mutex_lock(&sp->mutex); do { - spin_lock_irqsave(&sp->list_lock,irq_flags); + spin_lock_irqsave(&sp->list_lock, irq_flags); sp->callback_data = data; sp->callback_func = func; - spin_unlock_irqrestore(&sp->list_lock,irq_flags); - } while(0); + spin_unlock_irqrestore(&sp->list_lock, irq_flags); + } while (0); mutex_unlock(&sp->mutex); } @@ -518,7 +518,7 @@ void pvr2_stream_get_stats(struct pvr2_stream *sp, int zero_counts) { unsigned long irq_flags; - spin_lock_irqsave(&sp->list_lock,irq_flags); + spin_lock_irqsave(&sp->list_lock, irq_flags); if (stats) { stats->buffers_in_queue = sp->q_count; stats->buffers_in_idle = sp->i_count; @@ -532,7 +532,7 @@ void pvr2_stream_get_stats(struct pvr2_stream *sp, sp->buffers_failed = 0; sp->bytes_processed = 0; } - spin_unlock_irqrestore(&sp->list_lock,irq_flags); + spin_unlock_irqrestore(&sp->list_lock, irq_flags); } /* Query / set the nominal buffer count */ @@ -541,7 +541,7 @@ int pvr2_stream_get_buffer_count(struct pvr2_stream *sp) return sp->buffer_target_count; } -int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt) +int pvr2_stream_set_buffer_count(struct pvr2_stream *sp, unsigned int cnt) { int ret; if (sp->buffer_target_count == cnt) return 0; @@ -549,7 +549,7 @@ int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt) do { sp->buffer_target_count = cnt; ret = pvr2_stream_achieve_buffer_count(sp); - } while(0); + } while (0); mutex_unlock(&sp->mutex); return ret; } @@ -558,17 +558,17 @@ struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *sp) { struct list_head *lp = sp->idle_list.next; if (lp == &sp->idle_list) return NULL; - return list_entry(lp,struct pvr2_buffer,list_overhead); + return list_entry(lp, struct pvr2_buffer, list_overhead); } struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *sp) { struct list_head *lp = sp->ready_list.next; if (lp == &sp->ready_list) return NULL; - return list_entry(lp,struct pvr2_buffer,list_overhead); + return list_entry(lp, struct pvr2_buffer, list_overhead); } -struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id) +struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp, int id) { if (id < 0) return NULL; if (id >= sp->buffer_total_count) return NULL; @@ -592,7 +592,7 @@ void pvr2_stream_kill(struct pvr2_stream *sp) if (sp->buffer_total_count != sp->buffer_target_count) { pvr2_stream_achieve_buffer_count(sp); } - } while(0); + } while (0); mutex_unlock(&sp->mutex); } @@ -626,18 +626,18 @@ int pvr2_buffer_queue(struct pvr2_buffer *bp) usb_fill_bulk_urb(bp->purb, // struct urb *urb sp->dev, // struct usb_device *dev // endpoint (below) - usb_rcvbulkpipe(sp->dev,sp->endpoint), + usb_rcvbulkpipe(sp->dev, sp->endpoint), bp->ptr, // void *transfer_buffer bp->max_count, // int buffer_length buffer_complete, bp); - usb_submit_urb(bp->purb,GFP_KERNEL); - } while(0); + usb_submit_urb(bp->purb, GFP_KERNEL); + } while (0); mutex_unlock(&sp->mutex); return ret; } -int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt) +int pvr2_buffer_set_buffer(struct pvr2_buffer *bp, void *ptr, unsigned int cnt) { int ret = 0; unsigned long irq_flags; @@ -646,7 +646,7 @@ int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt) sp = bp->stream; mutex_lock(&sp->mutex); do { - spin_lock_irqsave(&sp->list_lock,irq_flags); + spin_lock_irqsave(&sp->list_lock, irq_flags); if (bp->state != pvr2_buffer_state_idle) { ret = -EPERM; } else { @@ -658,10 +658,10 @@ int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt) "/*---TRACE_FLOW---*/ bufferPool %8s cap cap=%07d cnt=%02d", pvr2_buffer_state_decode( pvr2_buffer_state_idle), - bp->stream->i_bcount,bp->stream->i_count); + bp->stream->i_bcount, bp->stream->i_count); } - spin_unlock_irqrestore(&sp->list_lock,irq_flags); - } while(0); + spin_unlock_irqrestore(&sp->list_lock, irq_flags); + } while (0); mutex_unlock(&sp->mutex); return ret; } -- cgit v1.2.3-55-g7522 From 09bfd96ca32638596be95e43a3b981b96f9b5b30 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Fri, 4 Nov 2016 20:43:49 -0200 Subject: [media] af9035: read and store whole eeprom Read eeprom content to chip state and read values there when needed. Also debug dump eeprom content. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb-v2/af9035.c | 126 +++++++++++++++------------------- drivers/media/usb/dvb-usb-v2/af9035.h | 5 +- 2 files changed, 60 insertions(+), 71 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index c673726d9b70..61dac6a837ca 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -496,7 +496,8 @@ static int af9035_identify_state(struct dvb_usb_device *d, const char **name) { struct state *state = d_to_priv(d); struct usb_interface *intf = d->intf; - int ret, ts_mode_invalid; + int ret, i, ts_mode_invalid; + unsigned int utmp, eeprom_addr; u8 tmp; u8 wbuf[1] = { 1 }; u8 rbuf[4]; @@ -518,25 +519,48 @@ static int af9035_identify_state(struct dvb_usb_device *d, const char **name) state->prechip_version, state->chip_version, state->chip_type); if (state->chip_type == 0x9135) { - if (state->chip_version == 0x02) + if (state->chip_version == 0x02) { *name = AF9035_FIRMWARE_IT9135_V2; - else + utmp = 0x00461d; + } else { *name = AF9035_FIRMWARE_IT9135_V1; - state->eeprom_addr = EEPROM_BASE_IT9135; + utmp = 0x00461b; + } + + /* Check if eeprom exists */ + ret = af9035_rd_reg(d, utmp, &tmp); + if (ret < 0) + goto err; + + if (tmp == 0x00) { + dev_dbg(&intf->dev, "no eeprom\n"); + state->no_eeprom = true; + goto check_firmware_status; + } + + eeprom_addr = EEPROM_BASE_IT9135; } else if (state->chip_type == 0x9306) { *name = AF9035_FIRMWARE_IT9303; - state->eeprom_addr = EEPROM_BASE_IT9135; + state->no_eeprom = true; + goto check_firmware_status; } else { *name = AF9035_FIRMWARE_AF9035; - state->eeprom_addr = EEPROM_BASE_AF9035; + eeprom_addr = EEPROM_BASE_AF9035; + } + + /* Read and store eeprom */ + for (i = 0; i < 256; i += 32) { + ret = af9035_rd_regs(d, eeprom_addr + i, &state->eeprom[i], 32); + if (ret < 0) + goto err; } + dev_dbg(&intf->dev, "eeprom dump:\n"); + for (i = 0; i < 256; i += 16) + dev_dbg(&intf->dev, "%*ph\n", 16, &state->eeprom[i]); /* check for dual tuner mode */ - ret = af9035_rd_reg(d, state->eeprom_addr + EEPROM_TS_MODE, &tmp); - if (ret < 0) - goto err; - + tmp = state->eeprom[EEPROM_TS_MODE]; ts_mode_invalid = 0; switch (tmp) { case 0: @@ -560,7 +584,7 @@ static int af9035_identify_state(struct dvb_usb_device *d, const char **name) if (ts_mode_invalid) dev_info(&intf->dev, "ts mode=%d not supported, defaulting to single tuner mode!", tmp); - +check_firmware_status: ret = af9035_ctrl_msg(d, &req); if (ret < 0) goto err; @@ -750,11 +774,7 @@ static int af9035_download_firmware(struct dvb_usb_device *d, goto err; /* tell the slave I2C address */ - ret = af9035_rd_reg(d, - state->eeprom_addr + EEPROM_2ND_DEMOD_ADDR, - &tmp); - if (ret < 0) - goto err; + tmp = state->eeprom[EEPROM_2ND_DEMOD_ADDR]; /* use default I2C address if eeprom has no address set */ if (!tmp) @@ -819,7 +839,7 @@ static int af9035_read_config(struct dvb_usb_device *d) struct state *state = d_to_priv(d); int ret, i; u8 tmp; - u16 tmp16, addr; + u16 tmp16; /* demod I2C "address" */ state->af9033_i2c_addr[0] = 0x38; @@ -837,20 +857,16 @@ static int af9035_read_config(struct dvb_usb_device *d) if (state->chip_version == 0x02) { state->af9033_config[0].tuner = AF9033_TUNER_IT9135_60; state->af9033_config[1].tuner = AF9033_TUNER_IT9135_60; - tmp16 = 0x00461d; /* eeprom memory mapped location */ } else { state->af9033_config[0].tuner = AF9033_TUNER_IT9135_38; state->af9033_config[1].tuner = AF9033_TUNER_IT9135_38; - tmp16 = 0x00461b; /* eeprom memory mapped location */ } - /* check if eeprom exists */ - ret = af9035_rd_reg(d, tmp16, &tmp); - if (ret < 0) - goto err; + if (state->no_eeprom) { + /* Remote controller to NEC polling by default */ + state->ir_mode = 0x05; + state->ir_type = 0x00; - if (tmp == 0x00) { - dev_dbg(&intf->dev, "no eeprom\n"); goto skip_eeprom; } } else if (state->chip_type == 0x9306) { @@ -861,29 +877,24 @@ static int af9035_read_config(struct dvb_usb_device *d) return 0; } + /* Remote controller */ + state->ir_mode = state->eeprom[EEPROM_IR_MODE]; + state->ir_type = state->eeprom[EEPROM_IR_TYPE]; if (state->dual_mode) { /* read 2nd demodulator I2C address */ - ret = af9035_rd_reg(d, - state->eeprom_addr + EEPROM_2ND_DEMOD_ADDR, - &tmp); - if (ret < 0) - goto err; - + tmp = state->eeprom[EEPROM_2ND_DEMOD_ADDR]; if (tmp) state->af9033_i2c_addr[1] = tmp; dev_dbg(&intf->dev, "2nd demod I2C addr=%02x\n", tmp); } - addr = state->eeprom_addr; - for (i = 0; i < state->dual_mode + 1; i++) { - /* tuner */ - ret = af9035_rd_reg(d, addr + EEPROM_1_TUNER_ID, &tmp); - if (ret < 0) - goto err; + unsigned int eeprom_offset = 0; + /* tuner */ + tmp = state->eeprom[EEPROM_1_TUNER_ID + eeprom_offset]; dev_dbg(&intf->dev, "[%d]tuner=%02x\n", i, tmp); /* tuner sanity check */ @@ -956,21 +967,13 @@ static int af9035_read_config(struct dvb_usb_device *d) } /* tuner IF frequency */ - ret = af9035_rd_reg(d, addr + EEPROM_1_IF_L, &tmp); - if (ret < 0) - goto err; - - tmp16 = tmp; - - ret = af9035_rd_reg(d, addr + EEPROM_1_IF_H, &tmp); - if (ret < 0) - goto err; - + tmp = state->eeprom[EEPROM_1_IF_L + eeprom_offset]; + tmp16 = tmp << 0; + tmp = state->eeprom[EEPROM_1_IF_H + eeprom_offset]; tmp16 |= tmp << 8; - dev_dbg(&intf->dev, "[%d]IF=%d\n", i, tmp16); - addr += 0x10; /* shift for the 2nd tuner params */ + eeprom_offset += 0x10; /* shift for the 2nd tuner params */ } skip_eeprom: @@ -1872,25 +1875,13 @@ static int af9035_get_rc_config(struct dvb_usb_device *d, struct dvb_usb_rc *rc) { struct state *state = d_to_priv(d); struct usb_interface *intf = d->intf; - int ret; - u8 tmp; - ret = af9035_rd_reg(d, state->eeprom_addr + EEPROM_IR_MODE, &tmp); - if (ret < 0) - goto err; - - dev_dbg(&intf->dev, "ir_mode=%02x\n", tmp); + dev_dbg(&intf->dev, "ir_mode=%02x ir_type=%02x\n", + state->ir_mode, state->ir_type); /* don't activate rc if in HID mode or if not available */ - if (tmp == 5) { - ret = af9035_rd_reg(d, state->eeprom_addr + EEPROM_IR_TYPE, - &tmp); - if (ret < 0) - goto err; - - dev_dbg(&intf->dev, "ir_type=%02x\n", tmp); - - switch (tmp) { + if (state->ir_mode == 0x05) { + switch (state->ir_type) { case 0: /* NEC */ default: rc->allowed_protos = RC_BIT_NEC | RC_BIT_NECX | @@ -1910,11 +1901,6 @@ static int af9035_get_rc_config(struct dvb_usb_device *d, struct dvb_usb_rc *rc) } return 0; - -err: - dev_dbg(&intf->dev, "failed=%d\n", ret); - - return ret; } #else #define af9035_get_rc_config NULL diff --git a/drivers/media/usb/dvb-usb-v2/af9035.h b/drivers/media/usb/dvb-usb-v2/af9035.h index 1f83c9218ad0..89a08a4eac2e 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.h +++ b/drivers/media/usb/dvb-usb-v2/af9035.h @@ -61,9 +61,12 @@ struct state { u8 prechip_version; u8 chip_version; u16 chip_type; + u8 eeprom[256]; + bool no_eeprom; + u8 ir_mode; + u8 ir_type; u8 dual_mode:1; u8 no_read:1; - u16 eeprom_addr; u8 af9033_i2c_addr[2]; struct af9033_config af9033_config[2]; struct af9033_ops ops; -- cgit v1.2.3-55-g7522 From 35ef193b2aa35e404c08d0c9ad010cf171a88cbd Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Mon, 7 Nov 2016 01:14:23 -0200 Subject: [media] af9035: register it9133 tuner using platform binding it913x tuner driver is changed to platform model so we need bind it using platform_device_register_data(). Also remove hacks from I2C adapter where fake tuner driver address (addr >> 1) were used as those are no longer needed. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb-v2/af9035.c | 124 ++++++++++++++++------------------ drivers/media/usb/dvb-usb-v2/af9035.h | 2 + 2 files changed, 62 insertions(+), 64 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index 61dac6a837ca..a6ecd52b5917 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -335,14 +335,12 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap, /* TODO: correct limits > 40 */ ret = -EOPNOTSUPP; } else if ((msg[0].addr == state->af9033_i2c_addr[0]) || - (msg[0].addr == state->af9033_i2c_addr[1]) || - (state->chip_type == 0x9135)) { + (msg[0].addr == state->af9033_i2c_addr[1])) { /* demod access via firmware interface */ u32 reg = msg[0].buf[0] << 16 | msg[0].buf[1] << 8 | msg[0].buf[2]; - if (msg[0].addr == state->af9033_i2c_addr[1] || - msg[0].addr == (state->af9033_i2c_addr[1] >> 1)) + if (msg[0].addr == state->af9033_i2c_addr[1]) reg |= 0x100000; ret = af9035_rd_regs(d, reg, &msg[1].buf[0], @@ -396,14 +394,12 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap, /* TODO: correct limits > 40 */ ret = -EOPNOTSUPP; } else if ((msg[0].addr == state->af9033_i2c_addr[0]) || - (msg[0].addr == state->af9033_i2c_addr[1]) || - (state->chip_type == 0x9135)) { + (msg[0].addr == state->af9033_i2c_addr[1])) { /* demod access via firmware interface */ u32 reg = msg[0].buf[0] << 16 | msg[0].buf[1] << 8 | msg[0].buf[2]; - if (msg[0].addr == state->af9033_i2c_addr[1] || - msg[0].addr == (state->af9033_i2c_addr[1] >> 1)) + if (msg[0].addr == state->af9033_i2c_addr[1]) reg |= 0x100000; ret = af9035_wr_regs(d, reg, &msg[0].buf[3], @@ -1250,30 +1246,11 @@ static int af9035_frontend_detach(struct dvb_usb_adapter *adap) struct state *state = adap_to_priv(adap); struct dvb_usb_device *d = adap_to_d(adap); struct usb_interface *intf = d->intf; - int demod2; dev_dbg(&intf->dev, "adap->id=%d\n", adap->id); - /* - * For dual tuner devices we have to resolve 2nd demod client, as there - * is two different kind of tuner drivers; one is using I2C binding - * and the other is using DVB attach/detach binding. - */ - switch (state->af9033_config[adap->id].tuner) { - case AF9033_TUNER_IT9135_38: - case AF9033_TUNER_IT9135_51: - case AF9033_TUNER_IT9135_52: - case AF9033_TUNER_IT9135_60: - case AF9033_TUNER_IT9135_61: - case AF9033_TUNER_IT9135_62: - demod2 = 2; - break; - default: - demod2 = 1; - } - if (adap->id == 1) { - if (state->i2c_client[demod2]) + if (state->i2c_client[1]) af9035_del_i2c_dev(d); } else if (adap->id == 0) { if (state->i2c_client[0]) @@ -1513,50 +1490,58 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) case AF9033_TUNER_IT9135_38: case AF9033_TUNER_IT9135_51: case AF9033_TUNER_IT9135_52: - { - struct it913x_config it913x_config = { - .fe = adap->fe[0], - .chip_ver = 1, - }; - - if (state->dual_mode) { - if (adap->id == 0) - it913x_config.role = IT913X_ROLE_DUAL_MASTER; - else - it913x_config.role = IT913X_ROLE_DUAL_SLAVE; - } - - ret = af9035_add_i2c_dev(d, "it913x", - state->af9033_i2c_addr[adap->id] >> 1, - &it913x_config, &d->i2c_adap); - if (ret) - goto err; - - fe = adap->fe[0]; - break; - } case AF9033_TUNER_IT9135_60: case AF9033_TUNER_IT9135_61: case AF9033_TUNER_IT9135_62: { - struct it913x_config it913x_config = { + struct platform_device *pdev; + struct it913x_platform_data it913x_pdata = { + .regmap = state->af9033_config[adap->id].regmap, .fe = adap->fe[0], - .chip_ver = 2, }; + switch (state->af9033_config[adap->id].tuner) { + case AF9033_TUNER_IT9135_38: + case AF9033_TUNER_IT9135_51: + case AF9033_TUNER_IT9135_52: + it913x_pdata.chip_ver = 1; + break; + case AF9033_TUNER_IT9135_60: + case AF9033_TUNER_IT9135_61: + case AF9033_TUNER_IT9135_62: + it913x_pdata.chip_ver = 2; + break; + default: + ret = -ENODEV; + goto err; + } + if (state->dual_mode) { if (adap->id == 0) - it913x_config.role = IT913X_ROLE_DUAL_MASTER; + it913x_pdata.role = IT913X_ROLE_DUAL_MASTER; else - it913x_config.role = IT913X_ROLE_DUAL_SLAVE; + it913x_pdata.role = IT913X_ROLE_DUAL_SLAVE; + } else { + it913x_pdata.role = IT913X_ROLE_SINGLE; } - ret = af9035_add_i2c_dev(d, "it913x", - state->af9033_i2c_addr[adap->id] >> 1, - &it913x_config, &d->i2c_adap); - if (ret) + request_module("%s", "it913x"); + pdev = platform_device_register_data(&d->intf->dev, + "it913x", + PLATFORM_DEVID_AUTO, + &it913x_pdata, + sizeof(it913x_pdata)); + if (IS_ERR(pdev) || !pdev->dev.driver) { + ret = -ENODEV; + goto err; + } + if (!try_module_get(pdev->dev.driver->owner)) { + platform_device_unregister(pdev); + ret = -ENODEV; goto err; + } + state->platform_device_tuner[adap->id] = pdev; fe = adap->fe[0]; break; } @@ -1678,12 +1663,6 @@ static int af9035_tuner_detach(struct dvb_usb_adapter *adap) switch (state->af9033_config[adap->id].tuner) { case AF9033_TUNER_TUA9001: case AF9033_TUNER_FC2580: - case AF9033_TUNER_IT9135_38: - case AF9033_TUNER_IT9135_51: - case AF9033_TUNER_IT9135_52: - case AF9033_TUNER_IT9135_60: - case AF9033_TUNER_IT9135_61: - case AF9033_TUNER_IT9135_62: if (adap->id == 1) { if (state->i2c_client[3]) af9035_del_i2c_dev(d); @@ -1691,6 +1670,23 @@ static int af9035_tuner_detach(struct dvb_usb_adapter *adap) if (state->i2c_client[1]) af9035_del_i2c_dev(d); } + break; + case AF9033_TUNER_IT9135_38: + case AF9033_TUNER_IT9135_51: + case AF9033_TUNER_IT9135_52: + case AF9033_TUNER_IT9135_60: + case AF9033_TUNER_IT9135_61: + case AF9033_TUNER_IT9135_62: + { + struct platform_device *pdev; + + pdev = state->platform_device_tuner[adap->id]; + if (pdev) { + module_put(pdev->dev.driver->owner); + platform_device_unregister(pdev); + } + break; + } } return 0; diff --git a/drivers/media/usb/dvb-usb-v2/af9035.h b/drivers/media/usb/dvb-usb-v2/af9035.h index 89a08a4eac2e..a76e6bf0ab1e 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.h +++ b/drivers/media/usb/dvb-usb-v2/af9035.h @@ -22,6 +22,7 @@ #ifndef AF9035_H #define AF9035_H +#include #include "dvb_usb.h" #include "af9033.h" #include "tua9001.h" @@ -73,6 +74,7 @@ struct state { #define AF9035_I2C_CLIENT_MAX 4 struct i2c_client *i2c_client[AF9035_I2C_CLIENT_MAX]; struct i2c_adapter *i2c_adapter_demod; + struct platform_device *platform_device_tuner[2]; }; static const u32 clock_lut_af9035[] = { -- cgit v1.2.3-55-g7522 From 8efb34b280401acdaad19b6f1920af09d2628334 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Thu, 10 Nov 2016 01:24:50 -0200 Subject: [media] it913x: add chip device ids for binding Driver supports 2 different device versions, AX and BX. Use device IDs to pass chip version information to driver. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/tuners/it913x.c | 11 ++++++++++- drivers/media/tuners/it913x.h | 5 ----- drivers/media/usb/dvb-usb-v2/af9035.c | 8 ++++---- 3 files changed, 14 insertions(+), 10 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/tuners/it913x.c b/drivers/media/tuners/it913x.c index 39998066a347..27e5bc1c3cb5 100644 --- a/drivers/media/tuners/it913x.c +++ b/drivers/media/tuners/it913x.c @@ -390,6 +390,7 @@ static int it913x_probe(struct platform_device *pdev) struct it913x_platform_data *pdata = pdev->dev.platform_data; struct dvb_frontend *fe = pdata->fe; struct it913x_dev *dev; + const struct platform_device_id *id = platform_get_device_id(pdev); int ret; char *chip_ver_str; @@ -403,7 +404,7 @@ static int it913x_probe(struct platform_device *pdev) dev->pdev = pdev; dev->regmap = pdata->regmap; dev->fe = pdata->fe; - dev->chip_ver = pdata->chip_ver; + dev->chip_ver = id->driver_data; dev->role = pdata->role; fe->tuner_priv = dev; @@ -441,6 +442,13 @@ static int it913x_remove(struct platform_device *pdev) return 0; } +static const struct platform_device_id it913x_id_table[] = { + {"it9133ax-tuner", 1}, + {"it9133bx-tuner", 2}, + {}, +}; +MODULE_DEVICE_TABLE(platform, it913x_id_table); + static struct platform_driver it913x_driver = { .driver = { .name = "it913x", @@ -448,6 +456,7 @@ static struct platform_driver it913x_driver = { }, .probe = it913x_probe, .remove = it913x_remove, + .id_table = it913x_id_table, }; module_platform_driver(it913x_driver); diff --git a/drivers/media/tuners/it913x.h b/drivers/media/tuners/it913x.h index 9fb8e028176d..226f657228fb 100644 --- a/drivers/media/tuners/it913x.h +++ b/drivers/media/tuners/it913x.h @@ -25,21 +25,16 @@ * struct it913x_platform_data - Platform data for the it913x driver * @regmap: af9033 demod driver regmap. * @dvb_frontend: af9033 demod driver DVB frontend. - * @chip_ver: Used chip version. 1=IT9133 AX, 2=IT9133 BX. * @role: Chip role, single or dual configuration. */ struct it913x_platform_data { struct regmap *regmap; struct dvb_frontend *fe; - unsigned int chip_ver:2; #define IT913X_ROLE_SINGLE 0 #define IT913X_ROLE_DUAL_MASTER 1 #define IT913X_ROLE_DUAL_SLAVE 2 unsigned int role:2; }; -/* Backwards compatibility */ -#define it913x_config it913x_platform_data - #endif diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index a6ecd52b5917..cb8204387d64 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -1495,6 +1495,7 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) case AF9033_TUNER_IT9135_62: { struct platform_device *pdev; + const char *name; struct it913x_platform_data it913x_pdata = { .regmap = state->af9033_config[adap->id].regmap, .fe = adap->fe[0], @@ -1504,12 +1505,12 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) case AF9033_TUNER_IT9135_38: case AF9033_TUNER_IT9135_51: case AF9033_TUNER_IT9135_52: - it913x_pdata.chip_ver = 1; + name = "it9133ax-tuner"; break; case AF9033_TUNER_IT9135_60: case AF9033_TUNER_IT9135_61: case AF9033_TUNER_IT9135_62: - it913x_pdata.chip_ver = 2; + name = "it9133bx-tuner"; break; default: ret = -ENODEV; @@ -1526,8 +1527,7 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) } request_module("%s", "it913x"); - pdev = platform_device_register_data(&d->intf->dev, - "it913x", + pdev = platform_device_register_data(&d->intf->dev, name, PLATFORM_DEVID_AUTO, &it913x_pdata, sizeof(it913x_pdata)); -- cgit v1.2.3-55-g7522 From a71e479c132a084d49246908808ba96c33e59226 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Mon, 7 Nov 2016 02:01:03 -0200 Subject: [media] af9035: correct demod i2c addresses Chip uses so called 8-bit i2c addresses, but on bus there is of course correct 7-bit addresses with rw bit as lsb - verified with oscilloscope. Lets still use correct addresses in driver. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb-v2/af9035.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index cb8204387d64..4df9486e19b9 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -772,9 +772,9 @@ static int af9035_download_firmware(struct dvb_usb_device *d, /* tell the slave I2C address */ tmp = state->eeprom[EEPROM_2ND_DEMOD_ADDR]; - /* use default I2C address if eeprom has no address set */ + /* Use default I2C address if eeprom has no address set */ if (!tmp) - tmp = 0x3a; + tmp = 0x1d << 1; /* 8-bit format used by chip */ if ((state->chip_type == 0x9135) || (state->chip_type == 0x9306)) { @@ -837,9 +837,9 @@ static int af9035_read_config(struct dvb_usb_device *d) u8 tmp; u16 tmp16; - /* demod I2C "address" */ - state->af9033_i2c_addr[0] = 0x38; - state->af9033_i2c_addr[1] = 0x3a; + /* Demod I2C address */ + state->af9033_i2c_addr[0] = 0x1c; + state->af9033_i2c_addr[1] = 0x1d; state->af9033_config[0].adc_multiplier = AF9033_ADC_MULTIPLIER_2X; state->af9033_config[1].adc_multiplier = AF9033_ADC_MULTIPLIER_2X; state->af9033_config[0].ts_mode = AF9033_TS_MODE_USB; @@ -878,12 +878,13 @@ static int af9035_read_config(struct dvb_usb_device *d) state->ir_type = state->eeprom[EEPROM_IR_TYPE]; if (state->dual_mode) { - /* read 2nd demodulator I2C address */ + /* Read 2nd demodulator I2C address. 8-bit format on eeprom */ tmp = state->eeprom[EEPROM_2ND_DEMOD_ADDR]; if (tmp) - state->af9033_i2c_addr[1] = tmp; + state->af9033_i2c_addr[1] = tmp >> 1; - dev_dbg(&intf->dev, "2nd demod I2C addr=%02x\n", tmp); + dev_dbg(&intf->dev, "2nd demod I2C addr=%02x\n", + state->af9033_i2c_addr[1]); } for (i = 0; i < state->dual_mode + 1; i++) { -- cgit v1.2.3-55-g7522 From bb1d34875cac75b809230aafbceebce813c9175b Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Mon, 12 Dec 2016 09:16:49 -0200 Subject: [media] uvcvideo: (cosmetic) Add and use an inline function Add an inline function to obtain a struct uvc_buffer pointer from a struct vb2_v4l2_buffer one. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/uvc/uvc_queue.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c index 77edd206d345..0cc7ae23604d 100644 --- a/drivers/media/usb/uvc/uvc_queue.c +++ b/drivers/media/usb/uvc/uvc_queue.c @@ -43,6 +43,11 @@ uvc_queue_to_stream(struct uvc_video_queue *queue) return container_of(queue, struct uvc_streaming, queue); } +static inline struct uvc_buffer *uvc_vbuf_to_buffer(struct vb2_v4l2_buffer *buf) +{ + return container_of(buf, struct uvc_buffer, buf); +} + /* * Return all queued buffers to videobuf2 in the requested state. * @@ -89,7 +94,7 @@ static int uvc_buffer_prepare(struct vb2_buffer *vb) { struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); struct uvc_video_queue *queue = vb2_get_drv_priv(vb->vb2_queue); - struct uvc_buffer *buf = container_of(vbuf, struct uvc_buffer, buf); + struct uvc_buffer *buf = uvc_vbuf_to_buffer(vbuf); if (vb->type == V4L2_BUF_TYPE_VIDEO_OUTPUT && vb2_get_plane_payload(vb, 0) > vb2_plane_size(vb, 0)) { @@ -116,7 +121,7 @@ static void uvc_buffer_queue(struct vb2_buffer *vb) { struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); struct uvc_video_queue *queue = vb2_get_drv_priv(vb->vb2_queue); - struct uvc_buffer *buf = container_of(vbuf, struct uvc_buffer, buf); + struct uvc_buffer *buf = uvc_vbuf_to_buffer(vbuf); unsigned long flags; spin_lock_irqsave(&queue->irqlock, flags); @@ -138,7 +143,7 @@ static void uvc_buffer_finish(struct vb2_buffer *vb) struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); struct uvc_video_queue *queue = vb2_get_drv_priv(vb->vb2_queue); struct uvc_streaming *stream = uvc_queue_to_stream(queue); - struct uvc_buffer *buf = container_of(vbuf, struct uvc_buffer, buf); + struct uvc_buffer *buf = uvc_vbuf_to_buffer(vbuf); if (vb->state == VB2_BUF_STATE_DONE) uvc_video_clock_update(stream, vbuf, buf); -- cgit v1.2.3-55-g7522 From 313fe8473bd5bf50f5c209df3deafed5f1d84136 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Mon, 12 Dec 2016 09:16:50 -0200 Subject: [media] uvcvideo: (cosmetic) Remove a superfluous assignment Remove a superfluous assignment to a local variable at the end of a function. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/uvc/uvc_video.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c index f3c1c852e401..07a6c833ef7b 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -1262,8 +1262,7 @@ static void uvc_video_decode_bulk(struct urb *urb, struct uvc_streaming *stream, uvc_video_decode_end(stream, buf, stream->bulk.header, stream->bulk.payload_size); if (buf->state == UVC_BUF_STATE_READY) - buf = uvc_queue_next_buffer(&stream->queue, - buf); + uvc_queue_next_buffer(&stream->queue, buf); } stream->bulk.header_size = 0; -- cgit v1.2.3-55-g7522 From 17c341ec0115837a610b2da15e32546e26068234 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Mon, 12 Dec 2016 09:16:51 -0200 Subject: [media] uvcvideo: Fix a wrong macro Don't mix up UVC_BUF_STATE_* and VB2_BUF_STATE_* codes. Fixes: 6998b6fb4b1c ("[media] uvcvideo: Use videobuf2-vmalloc") Cc: stable@vger.kernel.org Signed-off-by: Guennadi Liakhovetski Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/uvc/uvc_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c index 0cc7ae23604d..aa2199775cb8 100644 --- a/drivers/media/usb/uvc/uvc_queue.c +++ b/drivers/media/usb/uvc/uvc_queue.c @@ -417,7 +417,7 @@ struct uvc_buffer *uvc_queue_next_buffer(struct uvc_video_queue *queue, nextbuf = NULL; spin_unlock_irqrestore(&queue->irqlock, flags); - buf->state = buf->error ? VB2_BUF_STATE_ERROR : UVC_BUF_STATE_DONE; + buf->state = buf->error ? UVC_BUF_STATE_ERROR : UVC_BUF_STATE_DONE; vb2_set_plane_payload(&buf->buf.vb2_buf, 0, buf->bytesused); vb2_buffer_done(&buf->buf.vb2_buf, VB2_BUF_STATE_DONE); -- cgit v1.2.3-55-g7522 From 39dc3aaeec638f1f5399777eea5e21dd5a699f46 Mon Sep 17 00:00:00 2001 From: Jaejoong Kim Date: Wed, 11 Jan 2017 23:31:21 -0200 Subject: [media] uvcvideo: Change result code of debugfs_init to void The device driver should keep going even if debugfs initialization fails. So, change the return type to void. Signed-off-by: Jaejoong Kim Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/uvc/uvc_debugfs.c | 15 ++++++--------- drivers/media/usb/uvc/uvcvideo.h | 4 ++-- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/uvc/uvc_debugfs.c b/drivers/media/usb/uvc/uvc_debugfs.c index 14561a5abb79..368f8f8dfcb5 100644 --- a/drivers/media/usb/uvc/uvc_debugfs.c +++ b/drivers/media/usb/uvc/uvc_debugfs.c @@ -75,14 +75,14 @@ static const struct file_operations uvc_debugfs_stats_fops = { static struct dentry *uvc_debugfs_root_dir; -int uvc_debugfs_init_stream(struct uvc_streaming *stream) +void uvc_debugfs_init_stream(struct uvc_streaming *stream) { struct usb_device *udev = stream->dev->udev; struct dentry *dent; char dir_name[32]; if (uvc_debugfs_root_dir == NULL) - return -ENODEV; + return; sprintf(dir_name, "%u-%u", udev->bus->busnum, udev->devnum); @@ -90,7 +90,7 @@ int uvc_debugfs_init_stream(struct uvc_streaming *stream) if (IS_ERR_OR_NULL(dent)) { uvc_printk(KERN_INFO, "Unable to create debugfs %s " "directory.\n", dir_name); - return -ENODEV; + return; } stream->debugfs_dir = dent; @@ -100,10 +100,8 @@ int uvc_debugfs_init_stream(struct uvc_streaming *stream) if (IS_ERR_OR_NULL(dent)) { uvc_printk(KERN_INFO, "Unable to create debugfs stats file.\n"); uvc_debugfs_cleanup_stream(stream); - return -ENODEV; + return; } - - return 0; } void uvc_debugfs_cleanup_stream(struct uvc_streaming *stream) @@ -115,18 +113,17 @@ void uvc_debugfs_cleanup_stream(struct uvc_streaming *stream) stream->debugfs_dir = NULL; } -int uvc_debugfs_init(void) +void uvc_debugfs_init(void) { struct dentry *dir; dir = debugfs_create_dir("uvcvideo", usb_debug_root); if (IS_ERR_OR_NULL(dir)) { uvc_printk(KERN_INFO, "Unable to create debugfs directory\n"); - return -ENODATA; + return; } uvc_debugfs_root_dir = dir; - return 0; } void uvc_debugfs_cleanup(void) diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h index 3d6cc62f3cd2..4205e7a423f0 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -757,9 +757,9 @@ void uvc_video_decode_isight(struct urb *urb, struct uvc_streaming *stream, struct uvc_buffer *buf); /* debugfs and statistics */ -int uvc_debugfs_init(void); +void uvc_debugfs_init(void); void uvc_debugfs_cleanup(void); -int uvc_debugfs_init_stream(struct uvc_streaming *stream); +void uvc_debugfs_init_stream(struct uvc_streaming *stream); void uvc_debugfs_cleanup_stream(struct uvc_streaming *stream); size_t uvc_video_stats_dump(struct uvc_streaming *stream, char *buf, -- cgit v1.2.3-55-g7522 From 992b39872b800babcee278bb2b4b7a2d503ba984 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Thu, 23 Jul 2015 18:53:41 -0300 Subject: [media] zd1301: ZyDAS ZD1301 DVB USB interface driver ZyDAS ZD1301 is chip having USB interface and DVB-T demodulator integrated. This driver is for USB interface part. Device has USB ID 0ace:13a1. Used tuner is MT2060. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb-usb-ids.h | 1 + drivers/media/usb/dvb-usb-v2/Kconfig | 8 + drivers/media/usb/dvb-usb-v2/Makefile | 3 + drivers/media/usb/dvb-usb-v2/zd1301.c | 294 ++++++++++++++++++++++++++++++++++ 4 files changed, 306 insertions(+) create mode 100644 drivers/media/usb/dvb-usb-v2/zd1301.c (limited to 'drivers/media/usb') diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h index 779f4224b63e..55acd11dc052 100644 --- a/drivers/media/dvb-core/dvb-usb-ids.h +++ b/drivers/media/dvb-core/dvb-usb-ids.h @@ -73,6 +73,7 @@ #define USB_VID_GIGABYTE 0x1044 #define USB_VID_YUAN 0x1164 #define USB_VID_XTENSIONS 0x1ae7 +#define USB_VID_ZYDAS 0x0ace #define USB_VID_HUMAX_COEX 0x10b9 #define USB_VID_774 0x7a69 #define USB_VID_EVOLUTEPC 0x1e59 diff --git a/drivers/media/usb/dvb-usb-v2/Kconfig b/drivers/media/usb/dvb-usb-v2/Kconfig index 524533d3eb29..0e4944b2b0f4 100644 --- a/drivers/media/usb/dvb-usb-v2/Kconfig +++ b/drivers/media/usb/dvb-usb-v2/Kconfig @@ -156,3 +156,11 @@ config DVB_USB_DVBSKY select DVB_SP2 if MEDIA_SUBDRV_AUTOSELECT help Say Y here to support the USB receivers from DVBSky. + +config DVB_USB_ZD1301 + tristate "ZyDAS ZD1301" + depends on DVB_USB_V2 + select DVB_ZD1301_DEMOD if MEDIA_SUBDRV_AUTOSELECT + select MEDIA_TUNER_MT2060 if MEDIA_SUBDRV_AUTOSELECT + help + Say Y here to support the ZyDAS ZD1301 DVB USB receiver. diff --git a/drivers/media/usb/dvb-usb-v2/Makefile b/drivers/media/usb/dvb-usb-v2/Makefile index f10d4df0eae5..969f68e55265 100644 --- a/drivers/media/usb/dvb-usb-v2/Makefile +++ b/drivers/media/usb/dvb-usb-v2/Makefile @@ -40,6 +40,9 @@ obj-$(CONFIG_DVB_USB_RTL28XXU) += dvb-usb-rtl28xxu.o dvb-usb-dvbsky-objs := dvbsky.o obj-$(CONFIG_DVB_USB_DVBSKY) += dvb-usb-dvbsky.o +dvb-usb-zd1301-objs := zd1301.o +obj-$(CONFIG_DVB_USB_ZD1301) += zd1301.o + ccflags-y += -I$(srctree)/drivers/media/dvb-core ccflags-y += -I$(srctree)/drivers/media/dvb-frontends ccflags-y += -I$(srctree)/drivers/media/tuners diff --git a/drivers/media/usb/dvb-usb-v2/zd1301.c b/drivers/media/usb/dvb-usb-v2/zd1301.c new file mode 100644 index 000000000000..563e50c6a327 --- /dev/null +++ b/drivers/media/usb/dvb-usb-v2/zd1301.c @@ -0,0 +1,294 @@ +/* + * ZyDAS ZD1301 driver (USB interface) + * + * Copyright (C) 2015 Antti Palosaari + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "dvb_usb.h" +#include "zd1301_demod.h" +#include "mt2060.h" +#include +#include + +DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); + +struct zd1301_dev { + #define BUF_LEN 8 + u8 buf[BUF_LEN]; /* bulk USB control message */ + struct zd1301_demod_platform_data demod_pdata; + struct mt2060_platform_data mt2060_pdata; + struct platform_device *platform_device_demod; + struct i2c_client *i2c_client_tuner; +}; + +static int zd1301_ctrl_msg(struct dvb_usb_device *d, const u8 *wbuf, + unsigned int wlen, u8 *rbuf, unsigned int rlen) +{ + struct zd1301_dev *dev = d_to_priv(d); + struct usb_interface *intf = d->intf; + int ret, actual_length; + + mutex_lock(&d->usb_mutex); + + memcpy(&dev->buf, wbuf, wlen); + + dev_dbg(&intf->dev, ">>> %*ph\n", wlen, dev->buf); + + ret = usb_bulk_msg(d->udev, usb_sndbulkpipe(d->udev, 0x04), dev->buf, + wlen, &actual_length, 1000); + if (ret) { + dev_err(&intf->dev, "1st usb_bulk_msg() failed %d\n", ret); + goto err_mutex_unlock; + } + + if (rlen) { + ret = usb_bulk_msg(d->udev, usb_rcvbulkpipe(d->udev, 0x83), + dev->buf, rlen, &actual_length, 1000); + if (ret) { + dev_err(&intf->dev, + "2nd usb_bulk_msg() failed %d\n", ret); + goto err_mutex_unlock; + } + + dev_dbg(&intf->dev, "<<< %*ph\n", actual_length, dev->buf); + + if (actual_length != rlen) { + /* + * Chip replies often with 3 byte len stub. On that case + * we have to query new reply. + */ + dev_dbg(&intf->dev, "repeating reply message\n"); + + ret = usb_bulk_msg(d->udev, + usb_rcvbulkpipe(d->udev, 0x83), + dev->buf, rlen, &actual_length, + 1000); + if (ret) { + dev_err(&intf->dev, + "3rd usb_bulk_msg() failed %d\n", ret); + goto err_mutex_unlock; + } + + dev_dbg(&intf->dev, + "<<< %*ph\n", actual_length, dev->buf); + } + + memcpy(rbuf, dev->buf, rlen); + } + +err_mutex_unlock: + mutex_unlock(&d->usb_mutex); + return ret; +} + +static int zd1301_demod_wreg(void *reg_priv, u16 reg, u8 val) +{ + struct dvb_usb_device *d = reg_priv; + struct usb_interface *intf = d->intf; + int ret; + u8 buf[7] = {0x07, 0x00, 0x03, 0x01, + (reg >> 0) & 0xff, (reg >> 8) & 0xff, val}; + + ret = zd1301_ctrl_msg(d, buf, 7, NULL, 0); + if (ret) + goto err; + + return 0; +err: + dev_dbg(&intf->dev, "failed=%d\n", ret); + return ret; +} + +static int zd1301_demod_rreg(void *reg_priv, u16 reg, u8 *val) +{ + struct dvb_usb_device *d = reg_priv; + struct usb_interface *intf = d->intf; + int ret; + u8 buf[7] = {0x07, 0x00, 0x04, 0x01, + (reg >> 0) & 0xff, (reg >> 8) & 0xff, 0}; + + ret = zd1301_ctrl_msg(d, buf, 7, buf, 7); + if (ret) + goto err; + + *val = buf[6]; + + return 0; +err: + dev_dbg(&intf->dev, "failed=%d\n", ret); + return ret; +} + +static int zd1301_frontend_attach(struct dvb_usb_adapter *adap) +{ + struct dvb_usb_device *d = adap_to_d(adap); + struct zd1301_dev *dev = adap_to_priv(adap); + struct usb_interface *intf = d->intf; + struct platform_device *pdev; + struct i2c_client *client; + struct i2c_board_info board_info; + struct i2c_adapter *adapter; + struct dvb_frontend *frontend; + int ret; + + dev_dbg(&intf->dev, "\n"); + + /* Add platform demod */ + dev->demod_pdata.reg_priv = d; + dev->demod_pdata.reg_read = zd1301_demod_rreg; + dev->demod_pdata.reg_write = zd1301_demod_wreg; + request_module("%s", "zd1301_demod"); + pdev = platform_device_register_data(&intf->dev, + "zd1301_demod", + PLATFORM_DEVID_AUTO, + &dev->demod_pdata, + sizeof(dev->demod_pdata)); + if (IS_ERR(pdev)) { + ret = PTR_ERR(pdev); + goto err; + } + if (!pdev->dev.driver) { + ret = -ENODEV; + goto err; + } + if (!try_module_get(pdev->dev.driver->owner)) { + ret = -ENODEV; + goto err_platform_device_unregister; + } + + adapter = zd1301_demod_get_i2c_adapter(pdev); + frontend = zd1301_demod_get_dvb_frontend(pdev); + + /* Add I2C tuner */ + dev->mt2060_pdata.i2c_write_max = 9; + dev->mt2060_pdata.dvb_frontend = frontend; + memset(&board_info, 0, sizeof(board_info)); + strlcpy(board_info.type, "mt2060", I2C_NAME_SIZE); + board_info.addr = 0x60; + board_info.platform_data = &dev->mt2060_pdata; + request_module("%s", "mt2060"); + client = i2c_new_device(adapter, &board_info); + if (!client || !client->dev.driver) { + ret = -ENODEV; + goto err_module_put_demod; + } + if (!try_module_get(client->dev.driver->owner)) { + ret = -ENODEV; + goto err_i2c_unregister_device; + } + + dev->platform_device_demod = pdev; + dev->i2c_client_tuner = client; + adap->fe[0] = frontend; + + return 0; +err_i2c_unregister_device: + i2c_unregister_device(client); +err_module_put_demod: + module_put(pdev->dev.driver->owner); +err_platform_device_unregister: + platform_device_unregister(pdev); +err: + dev_dbg(&intf->dev, "failed=%d\n", ret); + return ret; +} + +static int zd1301_frontend_detach(struct dvb_usb_adapter *adap) +{ + struct dvb_usb_device *d = adap_to_d(adap); + struct zd1301_dev *dev = d_to_priv(d); + struct usb_interface *intf = d->intf; + struct platform_device *pdev; + struct i2c_client *client; + + dev_dbg(&intf->dev, "\n"); + + client = dev->i2c_client_tuner; + pdev = dev->platform_device_demod; + + /* Remove I2C tuner */ + if (client) { + module_put(client->dev.driver->owner); + i2c_unregister_device(client); + } + + /* Remove platform demod */ + if (pdev) { + module_put(pdev->dev.driver->owner); + platform_device_unregister(pdev); + } + + return 0; +} + +static int zd1301_streaming_ctrl(struct dvb_frontend *fe, int onoff) +{ + struct dvb_usb_device *d = fe_to_d(fe); + struct usb_interface *intf = d->intf; + int ret; + u8 buf[3] = {0x03, 0x00, onoff ? 0x07 : 0x08}; + + dev_dbg(&intf->dev, "onoff=%d\n", onoff); + + ret = zd1301_ctrl_msg(d, buf, 3, NULL, 0); + if (ret) + goto err; + + return 0; +err: + dev_dbg(&intf->dev, "failed=%d\n", ret); + return ret; +} + +static const struct dvb_usb_device_properties zd1301_props = { + .driver_name = KBUILD_MODNAME, + .owner = THIS_MODULE, + .adapter_nr = adapter_nr, + .size_of_priv = sizeof(struct zd1301_dev), + + .frontend_attach = zd1301_frontend_attach, + .frontend_detach = zd1301_frontend_detach, + .streaming_ctrl = zd1301_streaming_ctrl, + + .num_adapters = 1, + .adapter = { + { + .stream = DVB_USB_STREAM_BULK(0x81, 6, 21 * 188), + }, + }, +}; + +static const struct usb_device_id zd1301_id_table[] = { + {DVB_USB_DEVICE(USB_VID_ZYDAS, 0x13a1, &zd1301_props, + "ZyDAS ZD1301 reference design", NULL)}, + {} +}; +MODULE_DEVICE_TABLE(usb, zd1301_id_table); + +/* Usb specific object needed to register this driver with the usb subsystem */ +static struct usb_driver zd1301_usb_driver = { + .name = KBUILD_MODNAME, + .id_table = zd1301_id_table, + .probe = dvb_usbv2_probe, + .disconnect = dvb_usbv2_disconnect, + .suspend = dvb_usbv2_suspend, + .resume = dvb_usbv2_resume, + .reset_resume = dvb_usbv2_reset_resume, + .no_dynamic_id = 1, + .soft_unbind = 1, +}; +module_usb_driver(zd1301_usb_driver); + +MODULE_AUTHOR("Antti Palosaari "); +MODULE_DESCRIPTION("ZyDAS ZD1301 driver"); +MODULE_LICENSE("GPL"); -- cgit v1.2.3-55-g7522 From 90cd366bc61cd539c797b7ad957a9d749d97200f Mon Sep 17 00:00:00 2001 From: Shuah Khan Date: Tue, 29 Nov 2016 21:59:54 -0200 Subject: [media] media: Protect enable_source and disable_source handler code paths Drivers might try to access and run enable_source and disable_source handlers when the driver that implements these handlers is clearing the handlers during its unregister. Fix the following race condition: process 1 process 2 request video streaming unbind au0828 v4l2 checks if tuner is free ... ... au0828_unregister_media_device() ... ... (doesn't hold graph_mutex) mdev->enable_source = NULL; if (mdev && mdev->enable_source) mdev->disable_source = NULL; mdev->enable_source() (enable_source holds graph_mutex) As shown above enable_source check is done without holding the graph_mutex. If unbind happens to be in progress, au0828 could clear enable_source and disable_source handlers leading to null pointer de-reference. Fix it by protecting enable_source and disable_source set and clear and protecting enable_source and disable_source handler access and the call itself. process 1 process 2 request video streaming unbind au0828 v4l2 checks if tuner is free ... ... au0828_unregister_media_device() ... ... (hold graph_mutex while clearing) mdev->enable_source = NULL; if (mdev) mdev->disable_source = NULL; (hold graph_mutex to check and call enable_source) if (mdev->enable_source) mdev->enable_source() If graph_mutex is held to just heck for handler being null and needs to be released before calling the handler, there will be another window for the handlers to be cleared. Hence, enable_source and disable_source handlers no longer hold the graph_mutex and expect callers to hold it to avoid forcing them release the graph_mutex before calling the handlers. Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_frontend.c | 24 ++++++++++++++++++------ drivers/media/usb/au0828/au0828-core.c | 21 +++++++++------------ drivers/media/v4l2-core/v4l2-mc.c | 26 ++++++++++++++++++-------- include/media/media-device.h | 2 ++ 4 files changed, 47 insertions(+), 26 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 13dca47ea91e..85ae3669aa66 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -2533,9 +2533,13 @@ static int dvb_frontend_open(struct inode *inode, struct file *file) fepriv->voltage = -1; #ifdef CONFIG_MEDIA_CONTROLLER_DVB - if (fe->dvb->mdev && fe->dvb->mdev->enable_source) { - ret = fe->dvb->mdev->enable_source(dvbdev->entity, + if (fe->dvb->mdev) { + mutex_lock(&fe->dvb->mdev->graph_mutex); + if (fe->dvb->mdev->enable_source) + ret = fe->dvb->mdev->enable_source( + dvbdev->entity, &fepriv->pipe); + mutex_unlock(&fe->dvb->mdev->graph_mutex); if (ret) { dev_err(fe->dvb->device, "Tuner is busy. Error %d\n", ret); @@ -2559,8 +2563,12 @@ static int dvb_frontend_open(struct inode *inode, struct file *file) err3: #ifdef CONFIG_MEDIA_CONTROLLER_DVB - if (fe->dvb->mdev && fe->dvb->mdev->disable_source) - fe->dvb->mdev->disable_source(dvbdev->entity); + if (fe->dvb->mdev) { + mutex_lock(&fe->dvb->mdev->graph_mutex); + if (fe->dvb->mdev->disable_source) + fe->dvb->mdev->disable_source(dvbdev->entity); + mutex_unlock(&fe->dvb->mdev->graph_mutex); + } err2: #endif dvb_generic_release(inode, file); @@ -2592,8 +2600,12 @@ static int dvb_frontend_release(struct inode *inode, struct file *file) if (dvbdev->users == -1) { wake_up(&fepriv->wait_queue); #ifdef CONFIG_MEDIA_CONTROLLER_DVB - if (fe->dvb->mdev && fe->dvb->mdev->disable_source) - fe->dvb->mdev->disable_source(dvbdev->entity); + if (fe->dvb->mdev) { + mutex_lock(&fe->dvb->mdev->graph_mutex); + if (fe->dvb->mdev->disable_source) + fe->dvb->mdev->disable_source(dvbdev->entity); + mutex_unlock(&fe->dvb->mdev->graph_mutex); + } #endif if (fe->exit != DVB_FE_NO_EXIT) wake_up(&dvbdev->wait_queue); diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index 8c0494042d06..739df61cec4f 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c @@ -149,9 +149,11 @@ static void au0828_unregister_media_device(struct au0828_dev *dev) } /* clear enable_source, disable_source */ + mutex_lock(&mdev->graph_mutex); dev->media_dev->source_priv = NULL; dev->media_dev->enable_source = NULL; dev->media_dev->disable_source = NULL; + mutex_unlock(&mdev->graph_mutex); media_device_unregister(dev->media_dev); media_device_cleanup(dev->media_dev); @@ -274,6 +276,7 @@ create_link: } } +/* Callers should hold graph_mutex */ static int au0828_enable_source(struct media_entity *entity, struct media_pipeline *pipe) { @@ -287,8 +290,6 @@ static int au0828_enable_source(struct media_entity *entity, if (!mdev) return -ENODEV; - mutex_lock(&mdev->graph_mutex); - dev = mdev->source_priv; /* @@ -415,12 +416,12 @@ static int au0828_enable_source(struct media_entity *entity, dev->active_source->name, dev->active_sink->name, dev->active_link_owner->name, ret); end: - mutex_unlock(&mdev->graph_mutex); pr_debug("au0828_enable_source() end %s %d %d\n", entity->name, entity->function, ret); return ret; } +/* Callers should hold graph_mutex */ static void au0828_disable_source(struct media_entity *entity) { int ret = 0; @@ -430,13 +431,10 @@ static void au0828_disable_source(struct media_entity *entity) if (!mdev) return; - mutex_lock(&mdev->graph_mutex); dev = mdev->source_priv; - if (!dev->active_link) { - ret = -ENODEV; - goto end; - } + if (!dev->active_link) + return; /* link is active - stop pipeline from source (tuner) */ if (dev->active_link->sink->entity == dev->active_sink && @@ -446,7 +444,7 @@ static void au0828_disable_source(struct media_entity *entity) * has active pipeline */ if (dev->active_link_owner != entity) - goto end; + return; __media_pipeline_stop(entity); ret = __media_entity_setup_link(dev->active_link, 0); if (ret) @@ -461,9 +459,6 @@ static void au0828_disable_source(struct media_entity *entity) dev->active_source = NULL; dev->active_sink = NULL; } - -end: - mutex_unlock(&mdev->graph_mutex); } #endif @@ -545,9 +540,11 @@ static int au0828_media_device_register(struct au0828_dev *dev, return ret; } /* set enable_source */ + mutex_lock(&dev->media_dev->graph_mutex); dev->media_dev->source_priv = (void *) dev; dev->media_dev->enable_source = au0828_enable_source; dev->media_dev->disable_source = au0828_disable_source; + mutex_unlock(&dev->media_dev->graph_mutex); #endif return 0; } diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c index fcf614a82bb8..303980b71aae 100644 --- a/drivers/media/v4l2-core/v4l2-mc.c +++ b/drivers/media/v4l2-core/v4l2-mc.c @@ -198,14 +198,20 @@ EXPORT_SYMBOL_GPL(v4l2_mc_create_media_graph); int v4l_enable_media_source(struct video_device *vdev) { struct media_device *mdev = vdev->entity.graph_obj.mdev; - int ret; + int ret = 0, err; - if (!mdev || !mdev->enable_source) + if (!mdev) return 0; - ret = mdev->enable_source(&vdev->entity, &vdev->pipe); - if (ret) - return -EBUSY; - return 0; + + mutex_lock(&mdev->graph_mutex); + if (!mdev->enable_source) + goto end; + err = mdev->enable_source(&vdev->entity, &vdev->pipe); + if (err) + ret = -EBUSY; +end: + mutex_unlock(&mdev->graph_mutex); + return ret; } EXPORT_SYMBOL_GPL(v4l_enable_media_source); @@ -213,8 +219,12 @@ void v4l_disable_media_source(struct video_device *vdev) { struct media_device *mdev = vdev->entity.graph_obj.mdev; - if (mdev && mdev->disable_source) - mdev->disable_source(&vdev->entity); + if (mdev) { + mutex_lock(&mdev->graph_mutex); + if (mdev->disable_source) + mdev->disable_source(&vdev->entity); + mutex_unlock(&mdev->graph_mutex); + } } EXPORT_SYMBOL_GPL(v4l_disable_media_source); diff --git a/include/media/media-device.h b/include/media/media-device.h index ae4eef416d70..6896266031b9 100644 --- a/include/media/media-device.h +++ b/include/media/media-device.h @@ -121,6 +121,8 @@ struct media_device_ops { * bridge driver finds the media_device during probe. * Bridge driver sets source_priv with information * necessary to run @enable_source and @disable_source handlers. + * Callers should hold graph_mutex to access and call @enable_source + * and @disable_source handlers. */ struct media_device { /* dev->driver_data points to this struct. */ -- cgit v1.2.3-55-g7522 From 3a3402d3180cc8aea65de52a8897701b5828a928 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Wed, 30 Nov 2016 19:39:09 -0200 Subject: [media] lmedm04: use %phN for hex dump Using the %ph printf extension for hex dumps like this makes the generated code quite a bit smaller. Signed-off-by: Rasmus Villemoes Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb-v2/lmedm04.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index c2aff953cd7a..360cb62ee21d 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -95,9 +95,7 @@ static int dvb_usb_lme2510_debug; } while (0) #define deb_info(level, args...) lme_debug(dvb_usb_lme2510_debug, level, args) #define debug_data_snipet(level, name, p) \ - deb_info(level, name" (%02x%02x%02x%02x%02x%02x%02x%02x)", \ - *p, *(p+1), *(p+2), *(p+3), *(p+4), \ - *(p+5), *(p+6), *(p+7)); + deb_info(level, name" (%8phN)", p); #define info(args...) pr_info(DVB_USB_LOG_PREFIX": "args) module_param_named(debug, dvb_usb_lme2510_debug, int, 0644); -- cgit v1.2.3-55-g7522 From 75759e31e6e7f38625510a89fe580374a75db9f4 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Wed, 30 Nov 2016 19:39:10 -0200 Subject: [media] lmedm04: change some static variables to automatic ibuf and rbuf in lme2510_int_response are always assigned to before they are read, and their addresses do not escape the function, so they have no reason to be static. Signed-off-by: Rasmus Villemoes Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb-v2/lmedm04.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 360cb62ee21d..5a327676e235 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -309,7 +309,7 @@ static void lme2510_int_response(struct urb *lme_urb) { struct dvb_usb_adapter *adap = lme_urb->context; struct lme2510_state *st = adap_to_priv(adap); - static u8 *ibuf, *rbuf; + u8 *ibuf, *rbuf; int i = 0, offset; u32 key; u8 signal_lock = 0; -- cgit v1.2.3-55-g7522 From bfe17178a8240c008484c43cf9e018d43ff9a990 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Wed, 30 Nov 2016 19:39:11 -0200 Subject: [media] lmedm04: make some string arrays static It takes more .text to initialize these on the stack than they occupy in .rodata, so just make them static const. Signed-off-by: Rasmus Villemoes Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb-v2/lmedm04.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 5a327676e235..66833b61321a 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -996,8 +996,9 @@ static int lme_name(struct dvb_usb_adapter *adap) struct dvb_usb_device *d = adap_to_d(adap); struct lme2510_state *st = adap_to_priv(adap); const char *desc = d->name; - char *fe_name[] = {"", " LG TDQY-P001F", " SHARP:BS2F7HZ7395", - " SHARP:BS2F7HZ0194", " RS2000"}; + static const char * const fe_name[] = { + "", " LG TDQY-P001F", " SHARP:BS2F7HZ7395", + " SHARP:BS2F7HZ0194", " RS2000"}; char *name = adap->fe[0]->ops.info.name; strlcpy(name, desc, 128); @@ -1118,7 +1119,7 @@ static int dm04_lme2510_tuner(struct dvb_usb_adapter *adap) { struct dvb_usb_device *d = adap_to_d(adap); struct lme2510_state *st = adap_to_priv(adap); - char *tun_msg[] = {"", "TDA8263", "IX2505V", "DVB_PLL_OPERA", "RS2000"}; + static const char * const tun_msg[] = {"", "TDA8263", "IX2505V", "DVB_PLL_OPERA", "RS2000"}; int ret = 0; switch (st->tuner_config) { -- cgit v1.2.3-55-g7522 From 974eadf1fc4f9bd0e9da686e7ba6c3e4e708fc45 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Wed, 30 Nov 2016 19:39:12 -0200 Subject: [media] lmedm04: make lme2510_powerup a little smaller gcc isn't smart enough to realize it can share most of the argument buildup and the actual function call between the two branches, so help it a little. Signed-off-by: Rasmus Villemoes Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb-v2/lmedm04.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 66833b61321a..924adfdb660d 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -1173,10 +1173,7 @@ static int lme2510_powerup(struct dvb_usb_device *d, int onoff) mutex_lock(&d->i2c_mutex); - if (onoff) - ret = lme2510_usb_talk(d, lnb_on, len, rbuf, rlen); - else - ret = lme2510_usb_talk(d, lnb_off, len, rbuf, rlen); + ret = lme2510_usb_talk(d, onoff ? lnb_on : lnb_off, len, rbuf, rlen); st->i2c_talk_onoff = 1; -- cgit v1.2.3-55-g7522 From c099b73a29278c22a768a8c203c584e803388490 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 11 Jan 2017 14:24:33 -0200 Subject: [media] gspca_stv06xx: remove redundant check for err < 0 The comparison of err < 0 is redundant as err has been previously been assigned to 0 and has not changed. Remove the redundant check. Fixes CoverityScan CID#703363 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c index 9f490f55d367..d265e6b00994 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c +++ b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c @@ -116,9 +116,6 @@ static int vv6410_init(struct sd *sd) for (i = 0; i < ARRAY_SIZE(stv_bridge_init); i++) stv06xx_write_bridge(sd, stv_bridge_init[i].addr, stv_bridge_init[i].data); - if (err < 0) - return err; - err = stv06xx_write_sensor_bytes(sd, (u8 *) vv6410_sensor_init, ARRAY_SIZE(vv6410_sensor_init)); return (err < 0) ? err : 0; -- cgit v1.2.3-55-g7522 From e36e6b5f26c14fd588d5c7e78527d3707f8ac836 Mon Sep 17 00:00:00 2001 From: Marcel Hasler Date: Thu, 15 Dec 2016 20:17:26 -0200 Subject: [media] stk1160: Remove stk1160-mixer and setup internal AC97 codec automatically Exposing all the channels of the device's internal AC97 codec to userspace is unnecessary and confusing. Instead the driver should setup the codec with proper values. This patch removes the mixer and sets up the codec using optimal values, i.e. the same values set by the Windows driver. This also makes the device work out-of-the-box, without the need for the user to reconfigure the device every time it's plugged in. Signed-off-by: Marcel Hasler Acked-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/stk1160/Kconfig | 10 +-- drivers/media/usb/stk1160/Makefile | 4 +- drivers/media/usb/stk1160/stk1160-ac97.c | 126 +++++++++++-------------------- drivers/media/usb/stk1160/stk1160-core.c | 5 +- drivers/media/usb/stk1160/stk1160.h | 9 +-- 5 files changed, 50 insertions(+), 104 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/stk1160/Kconfig b/drivers/media/usb/stk1160/Kconfig index 95584c15dc5a..22dff4f3b921 100644 --- a/drivers/media/usb/stk1160/Kconfig +++ b/drivers/media/usb/stk1160/Kconfig @@ -8,17 +8,9 @@ config VIDEO_STK1160_COMMON To compile this driver as a module, choose M here: the module will be called stk1160 -config VIDEO_STK1160_AC97 - bool "STK1160 AC97 codec support" - depends on VIDEO_STK1160_COMMON && SND - - ---help--- - Enables AC97 codec support for stk1160 driver. - config VIDEO_STK1160 tristate - depends on (!VIDEO_STK1160_AC97 || (SND='n') || SND) && VIDEO_STK1160_COMMON + depends on VIDEO_STK1160_COMMON default y select VIDEOBUF2_VMALLOC select VIDEO_SAA711X - select SND_AC97_CODEC if SND diff --git a/drivers/media/usb/stk1160/Makefile b/drivers/media/usb/stk1160/Makefile index dfe3e90ff392..42d05463b353 100644 --- a/drivers/media/usb/stk1160/Makefile +++ b/drivers/media/usb/stk1160/Makefile @@ -1,10 +1,8 @@ -obj-stk1160-ac97-$(CONFIG_VIDEO_STK1160_AC97) := stk1160-ac97.o - stk1160-y := stk1160-core.o \ stk1160-v4l.o \ stk1160-video.o \ stk1160-i2c.o \ - $(obj-stk1160-ac97-y) + stk1160-ac97.o obj-$(CONFIG_VIDEO_STK1160) += stk1160.o diff --git a/drivers/media/usb/stk1160/stk1160-ac97.c b/drivers/media/usb/stk1160/stk1160-ac97.c index 2dd308f9541f..502fc8ee9a97 100644 --- a/drivers/media/usb/stk1160/stk1160-ac97.c +++ b/drivers/media/usb/stk1160/stk1160-ac97.c @@ -4,6 +4,9 @@ * Copyright (C) 2012 Ezequiel Garcia * * + * Copyright (C) 2016 Marcel Hasler + * + * * Based on Easycap driver by R.M. Thomas * Copyright (C) 2010 R.M. Thomas * @@ -20,20 +23,11 @@ * */ -#include -#include -#include -#include - #include "stk1160.h" #include "stk1160-reg.h" -static struct snd_ac97 *stk1160_ac97; - -static void stk1160_write_ac97(struct snd_ac97 *ac97, u16 reg, u16 value) +static void stk1160_write_ac97(struct stk1160 *dev, u16 reg, u16 value) { - struct stk1160 *dev = ac97->private_data; - /* Set codec register address */ stk1160_write_reg(dev, STK1160_AC97_ADDR, reg); @@ -48,9 +42,9 @@ static void stk1160_write_ac97(struct snd_ac97 *ac97, u16 reg, u16 value) stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x8c); } -static u16 stk1160_read_ac97(struct snd_ac97 *ac97, u16 reg) +#ifdef DEBUG +static u16 stk1160_read_ac97(struct stk1160 *dev, u16 reg) { - struct stk1160 *dev = ac97->private_data; u8 vall = 0; u8 valh = 0; @@ -70,81 +64,53 @@ static u16 stk1160_read_ac97(struct snd_ac97 *ac97, u16 reg) return (valh << 8) | vall; } -static void stk1160_reset_ac97(struct snd_ac97 *ac97) +void stk1160_ac97_dump_regs(struct stk1160 *dev) { - struct stk1160 *dev = ac97->private_data; - /* Two-step reset AC97 interface and hardware codec */ - stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x94); - stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x88); + u16 value; - /* Set 16-bit audio data and choose L&R channel*/ - stk1160_write_reg(dev, STK1160_AC97CTL_1 + 2, 0x01); -} + value = stk1160_read_ac97(dev, 0x12); /* CD volume */ + stk1160_dbg("0x12 == 0x%04x", value); -static struct snd_ac97_bus_ops stk1160_ac97_ops = { - .read = stk1160_read_ac97, - .write = stk1160_write_ac97, - .reset = stk1160_reset_ac97, -}; + value = stk1160_read_ac97(dev, 0x10); /* Line-in volume */ + stk1160_dbg("0x10 == 0x%04x", value); -int stk1160_ac97_register(struct stk1160 *dev) -{ - struct snd_card *card = NULL; - struct snd_ac97_bus *ac97_bus; - struct snd_ac97_template ac97_template; - int rc; + value = stk1160_read_ac97(dev, 0x0e); /* MIC volume (mono) */ + stk1160_dbg("0x0e == 0x%04x", value); - /* - * Just want a card to access ac96 controls, - * the actual capture interface will be handled by snd-usb-audio - */ - rc = snd_card_new(dev->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, - THIS_MODULE, 0, &card); - if (rc < 0) - return rc; - - /* TODO: I'm not sure where should I get these names :-( */ - snprintf(card->shortname, sizeof(card->shortname), - "stk1160-mixer"); - snprintf(card->longname, sizeof(card->longname), - "stk1160 ac97 codec mixer control"); - strlcpy(card->driver, dev->dev->driver->name, sizeof(card->driver)); - - rc = snd_ac97_bus(card, 0, &stk1160_ac97_ops, NULL, &ac97_bus); - if (rc) - goto err; - - /* We must set private_data before calling snd_ac97_mixer */ - memset(&ac97_template, 0, sizeof(ac97_template)); - ac97_template.private_data = dev; - ac97_template.scaps = AC97_SCAP_SKIP_MODEM; - rc = snd_ac97_mixer(ac97_bus, &ac97_template, &stk1160_ac97); - if (rc) - goto err; - - dev->snd_card = card; - rc = snd_card_register(card); - if (rc) - goto err; - - return 0; - -err: - dev->snd_card = NULL; - snd_card_free(card); - return rc; + value = stk1160_read_ac97(dev, 0x16); /* Aux volume */ + stk1160_dbg("0x16 == 0x%04x", value); + + value = stk1160_read_ac97(dev, 0x1a); /* Record select */ + stk1160_dbg("0x1a == 0x%04x", value); + + value = stk1160_read_ac97(dev, 0x02); /* Master volume */ + stk1160_dbg("0x02 == 0x%04x", value); + + value = stk1160_read_ac97(dev, 0x1c); /* Record gain */ + stk1160_dbg("0x1c == 0x%04x", value); } +#endif -int stk1160_ac97_unregister(struct stk1160 *dev) +void stk1160_ac97_setup(struct stk1160 *dev) { - struct snd_card *card = dev->snd_card; - - /* - * We need to check usb_device, - * because ac97 release attempts to communicate with codec - */ - if (card && dev->udev) - snd_card_free(card); + /* Two-step reset AC97 interface and hardware codec */ + stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x94); + stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x8c); - return 0; + /* Set 16-bit audio data and choose L&R channel*/ + stk1160_write_reg(dev, STK1160_AC97CTL_1 + 2, 0x01); + stk1160_write_reg(dev, STK1160_AC97CTL_1 + 3, 0x00); + + /* Setup channels */ + stk1160_write_ac97(dev, 0x12, 0x8808); /* CD volume */ + stk1160_write_ac97(dev, 0x10, 0x0808); /* Line-in volume */ + stk1160_write_ac97(dev, 0x0e, 0x0008); /* MIC volume (mono) */ + stk1160_write_ac97(dev, 0x16, 0x0808); /* Aux volume */ + stk1160_write_ac97(dev, 0x1a, 0x0404); /* Record select */ + stk1160_write_ac97(dev, 0x02, 0x0000); /* Master volume */ + stk1160_write_ac97(dev, 0x1c, 0x0808); /* Record gain */ + +#ifdef DEBUG + stk1160_ac97_dump_regs(dev); +#endif } diff --git a/drivers/media/usb/stk1160/stk1160-core.c b/drivers/media/usb/stk1160/stk1160-core.c index bc029478065a..f3c9b8a2c6e8 100644 --- a/drivers/media/usb/stk1160/stk1160-core.c +++ b/drivers/media/usb/stk1160/stk1160-core.c @@ -373,7 +373,7 @@ static int stk1160_probe(struct usb_interface *interface, /* select default input */ stk1160_select_input(dev); - stk1160_ac97_register(dev); + stk1160_ac97_setup(dev); rc = stk1160_video_register(dev); if (rc < 0) @@ -411,9 +411,6 @@ static void stk1160_disconnect(struct usb_interface *interface) /* Here is the only place where isoc get released */ stk1160_uninit_isoc(dev); - /* ac97 unregister needs to be done before usb_device is cleared */ - stk1160_ac97_unregister(dev); - stk1160_clear_queue(dev); video_unregister_device(&dev->vdev); diff --git a/drivers/media/usb/stk1160/stk1160.h b/drivers/media/usb/stk1160/stk1160.h index 1ed1cc43cdb2..e85e12eedcd2 100644 --- a/drivers/media/usb/stk1160/stk1160.h +++ b/drivers/media/usb/stk1160/stk1160.h @@ -197,11 +197,4 @@ int stk1160_read_reg_req_len(struct stk1160 *dev, u8 req, u16 reg, void stk1160_select_input(struct stk1160 *dev); /* Provided by stk1160-ac97.c */ -#ifdef CONFIG_VIDEO_STK1160_AC97 -int stk1160_ac97_register(struct stk1160 *dev); -int stk1160_ac97_unregister(struct stk1160 *dev); -#else -static inline int stk1160_ac97_register(struct stk1160 *dev) { return 0; } -static inline int stk1160_ac97_unregister(struct stk1160 *dev) { return 0; } -#endif - +void stk1160_ac97_setup(struct stk1160 *dev); -- cgit v1.2.3-55-g7522 From 1dc7df4d3d787639c9eeb8fc3841dd8d003de82a Mon Sep 17 00:00:00 2001 From: Marcel Hasler Date: Thu, 15 Dec 2016 20:13:34 -0200 Subject: [media] stk1160: Check whether to use AC97 codec Some STK1160-based devices use the chip's internal 8-bit ADC. This is configured through a strap pin. The value of this and other pins can be read through the POSVA register. If the internal ADC is used, or if audio is disabled altogether, there's no point trying to setup the AC97 codec. Signed-off-by: Marcel Hasler Acked-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/stk1160/stk1160-ac97.c | 26 ++++++++++++++++++++++++++ drivers/media/usb/stk1160/stk1160-core.c | 3 +-- drivers/media/usb/stk1160/stk1160-reg.h | 8 ++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/stk1160/stk1160-ac97.c b/drivers/media/usb/stk1160/stk1160-ac97.c index 502fc8ee9a97..5e9b76edd81c 100644 --- a/drivers/media/usb/stk1160/stk1160-ac97.c +++ b/drivers/media/usb/stk1160/stk1160-ac97.c @@ -91,8 +91,34 @@ void stk1160_ac97_dump_regs(struct stk1160 *dev) } #endif +int stk1160_has_audio(struct stk1160 *dev) +{ + u8 value; + + stk1160_read_reg(dev, STK1160_POSV_L, &value); + return !(value & STK1160_POSV_L_ACDOUT); +} + +int stk1160_has_ac97(struct stk1160 *dev) +{ + u8 value; + + stk1160_read_reg(dev, STK1160_POSV_L, &value); + return !(value & STK1160_POSV_L_ACSYNC); +} + void stk1160_ac97_setup(struct stk1160 *dev) { + if (!stk1160_has_audio(dev)) { + stk1160_info("Device doesn't support audio, skipping AC97 setup."); + return; + } + + if (!stk1160_has_ac97(dev)) { + stk1160_info("Device uses internal 8-bit ADC, skipping AC97 setup."); + return; + } + /* Two-step reset AC97 interface and hardware codec */ stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x94); stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x8c); diff --git a/drivers/media/usb/stk1160/stk1160-core.c b/drivers/media/usb/stk1160/stk1160-core.c index f3c9b8a2c6e8..c86eb6164713 100644 --- a/drivers/media/usb/stk1160/stk1160-core.c +++ b/drivers/media/usb/stk1160/stk1160-core.c @@ -20,8 +20,7 @@ * * TODO: * - * 1. (Try to) detect if we must register ac97 mixer - * 2. Support stream at lower speed: lower frame rate or lower frame size. + * 1. Support stream at lower speed: lower frame rate or lower frame size. * */ diff --git a/drivers/media/usb/stk1160/stk1160-reg.h b/drivers/media/usb/stk1160/stk1160-reg.h index 81ff3a15d96e..296a9e712c81 100644 --- a/drivers/media/usb/stk1160/stk1160-reg.h +++ b/drivers/media/usb/stk1160/stk1160-reg.h @@ -26,6 +26,14 @@ /* Remote Wakup Control */ #define STK1160_RMCTL 0x00c +/* Power-on Strapping Data */ +#define STK1160_POSVA 0x010 +#define STK1160_POSV_L 0x010 +#define STK1160_POSV_M 0x011 +#define STK1160_POSV_H 0x012 +#define STK1160_POSV_L_ACDOUT BIT(3) +#define STK1160_POSV_L_ACSYNC BIT(2) + /* * Decoder Control Register: * This byte controls capture start/stop -- cgit v1.2.3-55-g7522 From 9a4825edbcd6f7d7da88696412c6b0436ed7cc0b Mon Sep 17 00:00:00 2001 From: Marcel Hasler Date: Thu, 15 Dec 2016 20:14:03 -0200 Subject: [media] stk1160: Wait for completion of transfers to and from AC97 codec The STK1160 needs some time to transfer data to and from the AC97 codec. The transfer completion is indicated by command read/write bits in the chip's audio control register. The driver should poll these bits and wait until they have been cleared by hardware before trying to retrieve the results of a read operation or setting a new write command. [mchehab@s-opensource.com: make checkpatch happier] Signed-off-by: Marcel Hasler Acked-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/stk1160/stk1160-ac97.c | 39 +++++++++++++++++++++++++------- drivers/media/usb/stk1160/stk1160-reg.h | 2 ++ drivers/media/usb/stk1160/stk1160.h | 2 ++ 3 files changed, 35 insertions(+), 8 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/stk1160/stk1160-ac97.c b/drivers/media/usb/stk1160/stk1160-ac97.c index 5e9b76edd81c..85f0b84a33b8 100644 --- a/drivers/media/usb/stk1160/stk1160-ac97.c +++ b/drivers/media/usb/stk1160/stk1160-ac97.c @@ -23,9 +23,30 @@ * */ +#include + #include "stk1160.h" #include "stk1160-reg.h" +static int stk1160_ac97_wait_transfer_complete(struct stk1160 *dev) +{ + unsigned long timeout = jiffies + msecs_to_jiffies(STK1160_AC97_TIMEOUT); + u8 value; + + /* Wait for AC97 transfer to complete */ + while (time_is_after_jiffies(timeout)) { + stk1160_read_reg(dev, STK1160_AC97CTL_0, &value); + + if (!(value & (STK1160_AC97CTL_0_CR | STK1160_AC97CTL_0_CW))) + return 0; + + usleep_range(50, 100); + } + + stk1160_err("AC97 transfer took too long, this should never happen!"); + return -EBUSY; +} + static void stk1160_write_ac97(struct stk1160 *dev, u16 reg, u16 value) { /* Set codec register address */ @@ -35,11 +56,11 @@ static void stk1160_write_ac97(struct stk1160 *dev, u16 reg, u16 value) stk1160_write_reg(dev, STK1160_AC97_CMD, value & 0xff); stk1160_write_reg(dev, STK1160_AC97_CMD + 1, (value & 0xff00) >> 8); - /* - * Set command write bit to initiate write operation. - * The bit will be cleared when transfer is done. - */ + /* Set command write bit to initiate write operation */ stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x8c); + + /* Wait for command write bit to be cleared */ + stk1160_ac97_wait_transfer_complete(dev); } #ifdef DEBUG @@ -51,12 +72,14 @@ static u16 stk1160_read_ac97(struct stk1160 *dev, u16 reg) /* Set codec register address */ stk1160_write_reg(dev, STK1160_AC97_ADDR, reg); - /* - * Set command read bit to initiate read operation. - * The bit will be cleared when transfer is done. - */ + /* Set command read bit to initiate read operation */ stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x8b); + /* Wait for command read bit to be cleared */ + if (stk1160_ac97_wait_transfer_complete(dev) < 0) + return 0; + + /* Retrieve register value */ stk1160_read_reg(dev, STK1160_AC97_CMD, &vall); stk1160_read_reg(dev, STK1160_AC97_CMD + 1, &valh); diff --git a/drivers/media/usb/stk1160/stk1160-reg.h b/drivers/media/usb/stk1160/stk1160-reg.h index 296a9e712c81..7b08a3cc4504 100644 --- a/drivers/media/usb/stk1160/stk1160-reg.h +++ b/drivers/media/usb/stk1160/stk1160-reg.h @@ -122,6 +122,8 @@ /* AC97 Audio Control */ #define STK1160_AC97CTL_0 0x500 #define STK1160_AC97CTL_1 0x504 +#define STK1160_AC97CTL_0_CR BIT(1) +#define STK1160_AC97CTL_0_CW BIT(2) /* Use [0:6] bits of register 0x504 to set codec command address */ #define STK1160_AC97_ADDR 0x504 diff --git a/drivers/media/usb/stk1160/stk1160.h b/drivers/media/usb/stk1160/stk1160.h index e85e12eedcd2..acd1c811db08 100644 --- a/drivers/media/usb/stk1160/stk1160.h +++ b/drivers/media/usb/stk1160/stk1160.h @@ -50,6 +50,8 @@ #define STK1160_MAX_INPUT 4 #define STK1160_SVIDEO_INPUT 4 +#define STK1160_AC97_TIMEOUT 50 + #define STK1160_I2C_TIMEOUT 100 /* TODO: Print helpers -- cgit v1.2.3-55-g7522 From 504fc0286d847a23aed30bea214a9e51802f0318 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 3 Feb 2017 11:30:37 -0200 Subject: [media] stk1160: make some functions static As warned by gcc: drivers/media/usb/stk1160/stk1160-ac97.c:117:5: warning: no previous prototype for 'stk1160_has_audio' [-Wmissing-prototypes] int stk1160_has_audio(struct stk1160 *dev) ^~~~~~~~~~~~~~~~~ drivers/media/usb/stk1160/stk1160-ac97.c:125:5: warning: no previous prototype for 'stk1160_has_ac97' [-Wmissing-prototypes] int stk1160_has_ac97(struct stk1160 *dev) ^~~~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/stk1160/stk1160-ac97.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/stk1160/stk1160-ac97.c b/drivers/media/usb/stk1160/stk1160-ac97.c index 85f0b84a33b8..2169be8a71dd 100644 --- a/drivers/media/usb/stk1160/stk1160-ac97.c +++ b/drivers/media/usb/stk1160/stk1160-ac97.c @@ -114,7 +114,7 @@ void stk1160_ac97_dump_regs(struct stk1160 *dev) } #endif -int stk1160_has_audio(struct stk1160 *dev) +static int stk1160_has_audio(struct stk1160 *dev) { u8 value; @@ -122,7 +122,7 @@ int stk1160_has_audio(struct stk1160 *dev) return !(value & STK1160_POSV_L_ACDOUT); } -int stk1160_has_ac97(struct stk1160 *dev) +static int stk1160_has_ac97(struct stk1160 *dev) { u8 value; -- cgit v1.2.3-55-g7522 From 3f7060887294339eaa60e3399cf7ff4d36620395 Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso Date: Mon, 9 Jan 2017 13:41:34 -0200 Subject: [media] media/usbvision: remove ctrl_urb_wq While the wakeup path seems to be set up, this waitqueue is actually never used as no-one enqueues themselves on the list. As such, wakeups are meaningless without waiters, so lets just get rid of the whole thing. Signed-off-by: Davidlohr Bueso Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/usbvision/usbvision-core.c | 2 -- drivers/media/usb/usbvision/usbvision-video.c | 1 - drivers/media/usb/usbvision/usbvision.h | 1 - 3 files changed, 4 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/usbvision/usbvision-core.c b/drivers/media/usb/usbvision/usbvision-core.c index 0af713066825..3f87fbc80be2 100644 --- a/drivers/media/usb/usbvision/usbvision-core.c +++ b/drivers/media/usb/usbvision/usbvision-core.c @@ -1413,8 +1413,6 @@ static void usbvision_ctrl_urb_complete(struct urb *urb) PDEBUG(DBG_IRQ, ""); usbvision->ctrl_urb_busy = 0; - if (waitqueue_active(&usbvision->ctrl_urb_wq)) - wake_up_interruptible(&usbvision->ctrl_urb_wq); } diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c index b88fed38a3e5..f5c635a67d74 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c @@ -1336,7 +1336,6 @@ static struct usb_usbvision *usbvision_alloc(struct usb_device *dev, usbvision->ctrl_urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL); if (usbvision->ctrl_urb == NULL) goto err_unreg; - init_waitqueue_head(&usbvision->ctrl_urb_wq); return usbvision; diff --git a/drivers/media/usb/usbvision/usbvision.h b/drivers/media/usb/usbvision/usbvision.h index 56a28d651930..6ecdcd58248f 100644 --- a/drivers/media/usb/usbvision/usbvision.h +++ b/drivers/media/usb/usbvision/usbvision.h @@ -366,7 +366,6 @@ struct usb_usbvision { unsigned char ctrl_urb_buffer[8]; int ctrl_urb_busy; struct usb_ctrlrequest ctrl_urb_setup; - wait_queue_head_t ctrl_urb_wq; /* Processes waiting */ /* configuration part */ int have_tuner; -- cgit v1.2.3-55-g7522 From 1586342e428d80e53f9a926b2e238d2175b9f5b5 Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Tue, 10 Jan 2017 01:14:29 -0200 Subject: [media] em28xx: support for Hauppauge WinTV-dualHD 01595 ATSC/QAM Hauppauge WinTV-dualHD model 01595 is a USB 2.0 dual ATSC/QAM tuner with the following components: USB bridge: Empia em28274 Demodulator: 2x LG LGDT3306a at addresses 0xb2 and 0x1c Tuner: 2x Silicon Labs si2157 at addresses 0xc0 and 0xc4 This patch enables only the first tuner. Signed-off-by: Kevin Cheng Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/em28xx/em28xx-cards.c | 19 +++++++++ drivers/media/usb/em28xx/em28xx-dvb.c | 74 +++++++++++++++++++++++++++++++++ drivers/media/usb/em28xx/em28xx.h | 1 + 3 files changed, 94 insertions(+) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index 23c67494762d..5f90d0899a45 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -509,6 +509,7 @@ static struct em28xx_reg_seq plex_px_bcud[] = { /* * 2040:0265 Hauppauge WinTV-dualHD DVB + * 2040:026d Hauppauge WinTV-dualHD ATSC/QAM * reg 0x80/0x84: * GPIO_0: Yellow LED tuner 1, 0=on, 1=off * GPIO_1: Green LED tuner 1, 0=on, 1=off @@ -2389,6 +2390,21 @@ struct em28xx_board em28xx_boards[] = { .ir_codes = RC_MAP_HAUPPAUGE, .leds = hauppauge_dualhd_leds, }, + /* + * 2040:026d Hauppauge WinTV-dualHD (model 01595 - ATSC/QAM). + * Empia EM28274, 2x LG LGDT3306A, 2x Silicon Labs Si2157 + */ + [EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595] = { + .name = "Hauppauge WinTV-dualHD 01595 ATSC/QAM", + .def_i2c_bus = 1, + .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | + EM28XX_I2C_FREQ_400_KHZ, + .tuner_type = TUNER_ABSENT, + .tuner_gpio = hauppauge_dualhd_dvb, + .has_dvb = 1, + .ir_codes = RC_MAP_HAUPPAUGE, + .leds = hauppauge_dualhd_leds, + }, }; EXPORT_SYMBOL_GPL(em28xx_boards); @@ -2514,6 +2530,8 @@ struct usb_device_id em28xx_id_table[] = { .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 }, { USB_DEVICE(0x2040, 0x0265), .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB }, + { USB_DEVICE(0x2040, 0x026d), + .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 }, { USB_DEVICE(0x0438, 0xb002), .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 }, { USB_DEVICE(0x2001, 0xf112), @@ -2945,6 +2963,7 @@ static void em28xx_card_setup(struct em28xx *dev) case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C: case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB: + case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595: { struct tveeprom tv; diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c index 75a75dab2e8e..82edd37f0d73 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c @@ -37,6 +37,7 @@ #include "lgdt330x.h" #include "lgdt3305.h" +#include "lgdt3306a.h" #include "zl10353.h" #include "s5h1409.h" #include "mt2060.h" @@ -920,6 +921,17 @@ static struct tda18271_config pinnacle_80e_dvb_config = { .role = TDA18271_MASTER, }; +static struct lgdt3306a_config hauppauge_01595_lgdt3306a_config = { + .qam_if_khz = 4000, + .vsb_if_khz = 3250, + .spectral_inversion = 0, + .deny_i2c_rptr = 0, + .mpeg_mode = LGDT3306A_MPEG_SERIAL, + .tpclk_edge = LGDT3306A_TPCLK_RISING_EDGE, + .tpvalid_polarity = LGDT3306A_TP_VALID_HIGH, + .xtalMHz = 25, +}; + /* ------------------------------------------------------------------ */ static int em28xx_attach_xc3028(u8 addr, struct em28xx *dev) @@ -1950,6 +1962,68 @@ static int em28xx_dvb_init(struct em28xx *dev) } break; + case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595: + { + struct i2c_adapter *adapter; + struct i2c_client *client; + struct i2c_board_info info = {}; + struct lgdt3306a_config lgdt3306a_config; + struct si2157_config si2157_config = {}; + + /* attach demod */ + lgdt3306a_config = hauppauge_01595_lgdt3306a_config; + lgdt3306a_config.fe = &dvb->fe[0]; + lgdt3306a_config.i2c_adapter = &adapter; + strlcpy(info.type, "lgdt3306a", sizeof(info.type)); + info.addr = 0x59; + info.platform_data = &lgdt3306a_config; + request_module(info.type); + client = i2c_new_device(&dev->i2c_adap[dev->def_i2c_bus], + &info); + if (client == NULL || client->dev.driver == NULL) { + result = -ENODEV; + goto out_free; + } + + if (!try_module_get(client->dev.driver->owner)) { + i2c_unregister_device(client); + result = -ENODEV; + goto out_free; + } + + dvb->i2c_client_demod = client; + + /* attach tuner */ + si2157_config.fe = dvb->fe[0]; + si2157_config.if_port = 1; + si2157_config.inversion = 1; +#ifdef CONFIG_MEDIA_CONTROLLER_DVB + si2157_config.mdev = dev->media_dev; +#endif + memset(&info, 0, sizeof(struct i2c_board_info)); + strlcpy(info.type, "si2157", sizeof(info.type)); + info.addr = 0x60; + info.platform_data = &si2157_config; + request_module(info.type); + + client = i2c_new_device(adapter, &info); + if (client == NULL || client->dev.driver == NULL) { + module_put(dvb->i2c_client_demod->dev.driver->owner); + i2c_unregister_device(dvb->i2c_client_demod); + result = -ENODEV; + goto out_free; + } + if (!try_module_get(client->dev.driver->owner)) { + i2c_unregister_device(client); + module_put(dvb->i2c_client_demod->dev.driver->owner); + i2c_unregister_device(dvb->i2c_client_demod); + result = -ENODEV; + goto out_free; + } + + dvb->i2c_client_tuner = client; + } + break; default: dev_err(&dev->intf->dev, "The frontend of your DVB/ATSC card isn't supported yet\n"); diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h index ca59e2d4fccf..e9f379959fa5 100644 --- a/drivers/media/usb/em28xx/em28xx.h +++ b/drivers/media/usb/em28xx/em28xx.h @@ -147,6 +147,7 @@ #define EM2884_BOARD_ELGATO_EYETV_HYBRID_2008 97 #define EM28178_BOARD_PLEX_PX_BCUD 98 #define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB 99 +#define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 100 /* Limits minimum and default number of buffers */ #define EM28XX_MIN_BUF 4 -- cgit v1.2.3-55-g7522 From 634b2b5c65c8eafbd404ac5bc7ac710dcd1ca4eb Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Thu, 12 Jan 2017 12:30:47 -0200 Subject: [media] tm6000: fix typo in parameter description Fix typo in parameter description. Signed-off-by: Wei Yongjun Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/tm6000/tm6000-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/tm6000/tm6000-input.c b/drivers/media/usb/tm6000/tm6000-input.c index ef0dbd9c95f3..4afd4655d562 100644 --- a/drivers/media/usb/tm6000/tm6000-input.c +++ b/drivers/media/usb/tm6000/tm6000-input.c @@ -35,7 +35,7 @@ MODULE_PARM_DESC(enable_ir, "enable ir (default is enable)"); static unsigned int ir_clock_mhz = 12; module_param(ir_clock_mhz, int, 0644); -MODULE_PARM_DESC(enable_ir, "ir clock, in MHz"); +MODULE_PARM_DESC(ir_clock_mhz, "ir clock, in MHz"); #define URB_SUBMIT_DELAY 100 /* ms - Delay to submit an URB request on retrial and init */ #define URB_INT_LED_DELAY 100 /* ms - Delay to turn led on again on int mode */ -- cgit v1.2.3-55-g7522 From d46e0a8bdb6ef581167bb85129febc007e53d205 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Thu, 12 Jan 2017 13:32:29 -0200 Subject: [media] gp8psk: make local symbol gp8psk_fe_ops static Fixes the following sparse warning: drivers/media/usb/dvb-usb/gp8psk.c:281:28: warning: symbol 'gp8psk_fe_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb/gp8psk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb/gp8psk.c b/drivers/media/usb/dvb-usb/gp8psk.c index 26461f2ee428..37f062225ed2 100644 --- a/drivers/media/usb/dvb-usb/gp8psk.c +++ b/drivers/media/usb/dvb-usb/gp8psk.c @@ -278,7 +278,7 @@ static int gp8psk_fe_reload(void *priv) return gp8psk_bcm4500_reload(d); } -const struct gp8psk_fe_ops gp8psk_fe_ops = { +static const struct gp8psk_fe_ops gp8psk_fe_ops = { .in = gp8psk_fe_in, .out = gp8psk_fe_out, .reload = gp8psk_fe_reload, -- cgit v1.2.3-55-g7522 From 43fab9793c1f44e665b4f98035a14942edf03ddc Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 24 Jan 2017 08:13:11 -0200 Subject: [media] dvb-usb: don't use stack for firmware load As reported by Marc Duponcheel , firmware load on dvb-usb is using the stack, with is not allowed anymore on default Kernel configurations: [ 1025.958836] dvb-usb: found a 'WideView WT-220U PenType Receiver (based on ZL353)' in cold state, will try to load a firmware [ 1025.958853] dvb-usb: downloading firmware from file 'dvb-usb-wt220u-zl0353-01.fw' [ 1025.958855] dvb-usb: could not stop the USB controller CPU. [ 1025.958856] dvb-usb: error while transferring firmware (transferred size: -11, block size: 3) [ 1025.958856] dvb-usb: firmware download failed at 8 with -22 [ 1025.958867] usbcore: registered new interface driver dvb_usb_dtt200u [ 2.789902] dvb-usb: downloading firmware from file 'dvb-usb-wt220u-zl0353-01.fw' [ 2.789905] ------------[ cut here ]------------ [ 2.789911] WARNING: CPU: 3 PID: 2196 at drivers/usb/core/hcd.c:1584 usb_hcd_map_urb_for_dma+0x430/0x560 [usbcore] [ 2.789912] transfer buffer not dma capable [ 2.789912] Modules linked in: btusb dvb_usb_dtt200u(+) dvb_usb_af9035(+) btrtl btbcm dvb_usb dvb_usb_v2 btintel dvb_core bluetooth rc_core rfkill x86_pkg_temp_thermal intel_powerclamp coretemp crc32_pclmul aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd drm_kms_helper syscopyarea sysfillrect pcspkr i2c_i801 sysimgblt fb_sys_fops drm i2c_smbus i2c_core r8169 lpc_ich mfd_core mii thermal fan rtc_cmos video button acpi_cpufreq processor snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_timer snd crc32c_intel ahci libahci libata xhci_pci ehci_pci xhci_hcd ehci_hcd usbcore usb_common dm_mirror dm_region_hash dm_log dm_mod [ 2.789936] CPU: 3 PID: 2196 Comm: systemd-udevd Not tainted 4.9.0-gentoo #1 [ 2.789937] Hardware name: ASUS All Series/H81I-PLUS, BIOS 0401 07/23/2013 [ 2.789938] ffffc9000339b690 ffffffff812bd397 ffffc9000339b6e0 0000000000000000 [ 2.789939] ffffc9000339b6d0 ffffffff81055c86 000006300339b6a0 ffff880116c0c000 [ 2.789941] 0000000000000000 0000000000000000 0000000000000001 ffff880116c08000 [ 2.789942] Call Trace: [ 2.789945] [] dump_stack+0x4d/0x66 [ 2.789947] [] __warn+0xc6/0xe0 [ 2.789948] [] warn_slowpath_fmt+0x4a/0x50 [ 2.789952] [] usb_hcd_map_urb_for_dma+0x430/0x560 [usbcore] [ 2.789954] [] ? io_schedule_timeout+0xd8/0x110 [ 2.789956] [] usb_hcd_submit_urb+0x9c/0x980 [usbcore] [ 2.789958] [] ? copy_page_to_iter+0x14f/0x2b0 [ 2.789960] [] ? pagecache_get_page+0x28/0x240 [ 2.789962] [] ? touch_atime+0x20/0xa0 [ 2.789964] [] usb_submit_urb+0x2c4/0x520 [usbcore] [ 2.789967] [] usb_start_wait_urb+0x5a/0xe0 [usbcore] [ 2.789969] [] usb_control_msg+0xbc/0xf0 [usbcore] [ 2.789970] [] usb_cypress_writemem+0x3d/0x40 [dvb_usb] [ 2.789972] [] usb_cypress_load_firmware+0x4f/0x130 [dvb_usb] [ 2.789973] [] ? console_unlock+0x2fe/0x5d0 [ 2.789974] [] ? vprintk_emit+0x27c/0x410 [ 2.789975] [] ? vprintk_default+0x1a/0x20 [ 2.789976] [] ? printk+0x43/0x4b [ 2.789977] [] dvb_usb_download_firmware+0x60/0xd0 [dvb_usb] [ 2.789979] [] dvb_usb_device_init+0x3d8/0x610 [dvb_usb] [ 2.789981] [] dtt200u_usb_probe+0x92/0xd0 [dvb_usb_dtt200u] [ 2.789984] [] usb_probe_interface+0xfc/0x270 [usbcore] [ 2.789985] [] driver_probe_device+0x215/0x2d0 [ 2.789986] [] __driver_attach+0x96/0xa0 [ 2.789987] [] ? driver_probe_device+0x2d0/0x2d0 [ 2.789988] [] bus_for_each_dev+0x5b/0x90 [ 2.789989] [] driver_attach+0x19/0x20 [ 2.789990] [] bus_add_driver+0x11c/0x220 [ 2.789991] [] driver_register+0x5b/0xd0 [ 2.789994] [] usb_register_driver+0x7c/0x130 [usbcore] [ 2.789994] [] ? 0xffffffffa06a5000 [ 2.789996] [] dtt200u_usb_driver_init+0x1e/0x20 [dvb_usb_dtt200u] [ 2.789997] [] do_one_initcall+0x38/0x140 [ 2.789998] [] ? __vunmap+0x7c/0xc0 [ 2.789999] [] ? do_init_module+0x22/0x1d2 [ 2.790000] [] do_init_module+0x5a/0x1d2 [ 2.790002] [] load_module+0x1e11/0x2580 [ 2.790003] [] ? show_taint+0x30/0x30 [ 2.790004] [] ? kernel_read_file+0x100/0x190 [ 2.790005] [] SyS_finit_module+0xba/0xc0 [ 2.790007] [] entry_SYSCALL_64_fastpath+0x13/0x94 [ 2.790008] ---[ end trace c78a74e78baec6fc ]--- So, allocate the structure dynamically. Cc: stable@vger.kernel.org # Kernel 4.9+ Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c index f0023dbb7276..ab9866024ec7 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c @@ -35,28 +35,33 @@ static int usb_cypress_writemem(struct usb_device *udev,u16 addr,u8 *data, u8 le int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type) { - struct hexline hx; + struct hexline *hx; u8 reset; int ret,pos=0; + hx = kmalloc(sizeof(*hx), GFP_KERNEL); + if (!hx) + return -ENOMEM; + /* stop the CPU */ reset = 1; if ((ret = usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1)) != 1) err("could not stop the USB controller CPU."); - while ((ret = dvb_usb_get_hexline(fw,&hx,&pos)) > 0) { - deb_fw("writing to address 0x%04x (buffer: 0x%02x %02x)\n",hx.addr,hx.len,hx.chk); - ret = usb_cypress_writemem(udev,hx.addr,hx.data,hx.len); + while ((ret = dvb_usb_get_hexline(fw, hx, &pos)) > 0) { + deb_fw("writing to address 0x%04x (buffer: 0x%02x %02x)\n", hx->addr, hx->len, hx->chk); + ret = usb_cypress_writemem(udev, hx->addr, hx->data, hx->len); - if (ret != hx.len) { + if (ret != hx->len) { err("error while transferring firmware (transferred size: %d, block size: %d)", - ret,hx.len); + ret, hx->len); ret = -EINVAL; break; } } if (ret < 0) { err("firmware download failed at %d with %d",pos,ret); + kfree(hx); return ret; } @@ -70,6 +75,8 @@ int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw } else ret = -EIO; + kfree(hx); + return ret; } EXPORT_SYMBOL(usb_cypress_load_firmware); -- cgit v1.2.3-55-g7522 From a096fd6492ea676570e621d972f68ff03042d0c4 Mon Sep 17 00:00:00 2001 From: Oleh Kravchenko Date: Sun, 29 Jan 2017 16:03:51 -0200 Subject: [media] cx231xx: Initial support Evromedia USB Full Hybrid Full HD This patch provide only digital support. The device is based on Si2168 30-demodulator, Si2158-20 tuner and CX23102-11Z chipset; USB id: 1b80:d3b2. Status: - DVB-T2 works fine; - Composite and SVideo works fine; - Analog not implemented. Signed-off-by: Oleh Kravchenko Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/cx231xx/Kconfig | 1 + drivers/media/usb/cx231xx/cx231xx-cards.c | 29 +++++++++++++ drivers/media/usb/cx231xx/cx231xx-dvb.c | 70 +++++++++++++++++++++++++++++++ drivers/media/usb/cx231xx/cx231xx.h | 1 + 4 files changed, 101 insertions(+) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/cx231xx/Kconfig b/drivers/media/usb/cx231xx/Kconfig index 0cced3e5b040..58de80bff4c7 100644 --- a/drivers/media/usb/cx231xx/Kconfig +++ b/drivers/media/usb/cx231xx/Kconfig @@ -50,6 +50,7 @@ config VIDEO_CX231XX_DVB select DVB_LGDT3306A if MEDIA_SUBDRV_AUTOSELECT select DVB_TDA18271C2DD if MEDIA_SUBDRV_AUTOSELECT select DVB_SI2165 if MEDIA_SUBDRV_AUTOSELECT + select DVB_SI2168 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT ---help--- diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c index 36bc25494319..f730fdbc9156 100644 --- a/drivers/media/usb/cx231xx/cx231xx-cards.c +++ b/drivers/media/usb/cx231xx/cx231xx-cards.c @@ -841,6 +841,33 @@ struct cx231xx_board cx231xx_boards[] = { .gpio = NULL, } }, }, + [CX231XX_BOARD_EVROMEDIA_FULL_HYBRID_FULLHD] = { + .name = "Evromedia USB Full Hybrid Full HD", + .tuner_type = TUNER_ABSENT, + .demod_addr = 0x64, /* 0xc8 >> 1 */ + .demod_i2c_master = I2C_1_MUX_3, + .has_dvb = 1, + .ir_i2c_master = I2C_0, + .norm = V4L2_STD_PAL, + .output_mode = OUT_MODE_VIP11, + .tuner_addr = 0x60, /* 0xc0 >> 1 */ + .tuner_i2c_master = I2C_2, + .input = {{ + .type = CX231XX_VMUX_TELEVISION, + .vmux = 0, + .amux = CX231XX_AMUX_VIDEO, + }, { + .type = CX231XX_VMUX_COMPOSITE1, + .vmux = CX231XX_VIN_2_1, + .amux = CX231XX_AMUX_LINE_IN, + }, { + .type = CX231XX_VMUX_SVIDEO, + .vmux = CX231XX_VIN_1_1 | + (CX231XX_VIN_1_2 << 8) | + CX25840_SVIDEO_ON, + .amux = CX231XX_AMUX_LINE_IN, + } }, + }, }; const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards); @@ -908,6 +935,8 @@ struct usb_device_id cx231xx_id_table[] = { .driver_info = CX231XX_BOARD_OTG102}, {USB_DEVICE(USB_VID_TERRATEC, 0x00a6), .driver_info = CX231XX_BOARD_TERRATEC_GRABBY}, + {USB_DEVICE(0x1b80, 0xd3b2), + .driver_info = CX231XX_BOARD_EVROMEDIA_FULL_HYBRID_FULLHD}, {}, }; diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c index 2868546999ca..46427fd3b220 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c @@ -33,6 +33,7 @@ #include "s5h1411.h" #include "lgdt3305.h" #include "si2165.h" +#include "si2168.h" #include "mb86a20s.h" #include "si2157.h" #include "lgdt3306a.h" @@ -949,6 +950,75 @@ static int dvb_init(struct cx231xx *dev) &pv_tda18271_config); break; + case CX231XX_BOARD_EVROMEDIA_FULL_HYBRID_FULLHD: + { + struct si2157_config si2157_config = {}; + struct si2168_config si2168_config = {}; + struct i2c_board_info info = {}; + struct i2c_client *client; + struct i2c_adapter *adapter; + + /* attach demodulator chip */ + si2168_config.ts_mode = SI2168_TS_SERIAL; /* from *.inf file */ + si2168_config.fe = &dev->dvb->frontend; + si2168_config.i2c_adapter = &adapter; + si2168_config.ts_clock_inv = true; + + strlcpy(info.type, "si2168", sizeof(info.type)); + info.addr = dev->board.demod_addr; + info.platform_data = &si2168_config; + + request_module(info.type); + client = i2c_new_device(demod_i2c, &info); + + if (client == NULL || client->dev.driver == NULL) { + result = -ENODEV; + goto out_free; + } + + if (!try_module_get(client->dev.driver->owner)) { + i2c_unregister_device(client); + result = -ENODEV; + goto out_free; + } + + dvb->i2c_client_demod = client; + + /* attach tuner chip */ + si2157_config.fe = dev->dvb->frontend; +#ifdef CONFIG_MEDIA_CONTROLLER_DVB + si2157_config.mdev = dev->media_dev; +#endif + si2157_config.if_port = 1; + si2157_config.inversion = false; + + memset(&info, 0, sizeof(info)); + strlcpy(info.type, "si2157", sizeof(info.type)); + info.addr = dev->board.tuner_addr; + info.platform_data = &si2157_config; + + request_module(info.type); + client = i2c_new_device(tuner_i2c, &info); + + if (client == NULL || client->dev.driver == NULL) { + module_put(dvb->i2c_client_demod->dev.driver->owner); + i2c_unregister_device(dvb->i2c_client_demod); + result = -ENODEV; + goto out_free; + } + + if (!try_module_get(client->dev.driver->owner)) { + i2c_unregister_device(client); + module_put(dvb->i2c_client_demod->dev.driver->owner); + i2c_unregister_device(dvb->i2c_client_demod); + result = -ENODEV; + goto out_free; + } + + dev->cx231xx_reset_analog_tuner = NULL; + dev->dvb->i2c_client_tuner = client; + break; + } default: dev_err(dev->dev, "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h index 90c867683076..d9792ea4bbc6 100644 --- a/drivers/media/usb/cx231xx/cx231xx.h +++ b/drivers/media/usb/cx231xx/cx231xx.h @@ -78,6 +78,7 @@ #define CX231XX_BOARD_HAUPPAUGE_930C_HD_1114xx 20 #define CX231XX_BOARD_HAUPPAUGE_955Q 21 #define CX231XX_BOARD_TERRATEC_GRABBY 22 +#define CX231XX_BOARD_EVROMEDIA_FULL_HYBRID_FULLHD 23 /* Limits minimum and default number of buffers */ #define CX231XX_MIN_BUF 4 -- cgit v1.2.3-55-g7522 From 6c5da8031a3abfad259190d35f83d89568b72ee2 Mon Sep 17 00:00:00 2001 From: Oleh Kravchenko Date: Sun, 29 Jan 2017 16:07:31 -0200 Subject: [media] cx231xx: Fix I2C on Internal Master 3 Bus Internal Master 3 Bus can send and receive only 4 bytes per time. Signed-off-by: Oleh Kravchenko Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/cx231xx/cx231xx-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c b/drivers/media/usb/cx231xx/cx231xx-core.c index 550ec932f931..46646ecd2dbc 100644 --- a/drivers/media/usb/cx231xx/cx231xx-core.c +++ b/drivers/media/usb/cx231xx/cx231xx-core.c @@ -355,7 +355,12 @@ int cx231xx_send_vendor_cmd(struct cx231xx *dev, */ if ((ven_req->wLength > 4) && ((ven_req->bRequest == 0x4) || (ven_req->bRequest == 0x5) || - (ven_req->bRequest == 0x6))) { + (ven_req->bRequest == 0x6) || + + /* Internal Master 3 Bus can send + * and receive only 4 bytes per time + */ + (ven_req->bRequest == 0x2))) { unsend_size = 0; pdata = ven_req->pBuff; -- cgit v1.2.3-55-g7522 From 430ae1261c511efe9fc6293fbf24b1f71ea8c4ea Mon Sep 17 00:00:00 2001 From: Piotr Oleszczyk Date: Wed, 1 Feb 2017 18:26:42 -0200 Subject: [media] add Hama Hybrid DVB-T Stick support Adding Hama Hybrid DVB-T Stick support. Technically it's the same device what Terratec Cinergy HT USB XE is. Signed-off-by: Piotr Oleszczyk Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb-usb-ids.h | 4 +++- drivers/media/usb/dvb-usb/dib0700_devices.c | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h index 55acd11dc052..e200aa6f2d2f 100644 --- a/drivers/media/dvb-core/dvb-usb-ids.h +++ b/drivers/media/dvb-core/dvb-usb-ids.h @@ -79,6 +79,7 @@ #define USB_VID_EVOLUTEPC 0x1e59 #define USB_VID_AZUREWAVE 0x13d3 #define USB_VID_TECHNISAT 0x14f7 +#define USB_VID_HAMA 0x147f /* Product IDs */ #define USB_PID_ADSTECH_USB2_COLD 0xa333 @@ -413,5 +414,6 @@ #define USB_PID_SVEON_STV27 0xd3af #define USB_PID_TURBOX_DTT_2000 0xd3a4 #define USB_PID_WINTV_SOLOHD 0x0264 -#define USB_PID_EVOLVEO_XTRATV_STICK 0xa115 +#define USB_PID_EVOLVEO_XTRATV_STICK 0xa115 +#define USB_PID_HAMA_DVBT_HYBRID 0x2758 #endif diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c index b29d4894c2f1..81d7fd4f7776 100644 --- a/drivers/media/usb/dvb-usb/dib0700_devices.c +++ b/drivers/media/usb/dvb-usb/dib0700_devices.c @@ -3815,6 +3815,7 @@ struct usb_device_id dib0700_usb_id_table[] = { { USB_DEVICE(USB_VID_PCTV, USB_PID_PCTV_2002E_SE) }, { USB_DEVICE(USB_VID_PCTV, USB_PID_DIBCOM_STK8096PVR) }, { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK8096PVR) }, + { USB_DEVICE(USB_VID_HAMA, USB_PID_HAMA_DVBT_HYBRID) }, { 0 } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); @@ -4379,7 +4380,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { }, }, - .num_device_descs = 9, + .num_device_descs = 10, .devices = { { "Terratec Cinergy HT USB XE", { &dib0700_usb_id_table[27], NULL }, @@ -4417,6 +4418,10 @@ struct dvb_usb_device_properties dib0700_devices[] = { { &dib0700_usb_id_table[54], NULL }, { NULL }, }, + { "Hama DVB=T Hybrid USB Stick", + { &dib0700_usb_id_table[85], NULL }, + { NULL }, + }, }, .rc.core = { -- cgit v1.2.3-55-g7522 From 005145378c9ad7575a01b6ce1ba118fb427f583a Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 2 Feb 2017 12:36:01 -0200 Subject: [media] dvb-usb-v2: avoid use-after-free I ran into a stack frame size warning because of the on-stack copy of the USB device structure: drivers/media/usb/dvb-usb-v2/dvb_usb_core.c: In function 'dvb_usbv2_disconnect': drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:1029:1: error: the frame size of 1104 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Copying a device structure like this is wrong for a number of other reasons too aside from the possible stack overflow. One of them is that the dev_info() call will print the name of the device later, but AFAICT we have only copied a pointer to the name earlier and the actual name has been freed by the time it gets printed. This removes the on-stack copy of the device and instead copies the device name using kstrdup(). I'm ignoring the possible failure here as both printk() and kfree() are able to deal with NULL pointers. Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c index 298c91a6f1f9..955fb0d07507 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c @@ -1012,8 +1012,8 @@ EXPORT_SYMBOL(dvb_usbv2_probe); void dvb_usbv2_disconnect(struct usb_interface *intf) { struct dvb_usb_device *d = usb_get_intfdata(intf); - const char *name = d->name; - struct device dev = d->udev->dev; + const char *devname = kstrdup(dev_name(&d->udev->dev), GFP_KERNEL); + const char *drvname = d->name; dev_dbg(&d->udev->dev, "%s: bInterfaceNumber=%d\n", __func__, intf->cur_altsetting->desc.bInterfaceNumber); @@ -1023,8 +1023,9 @@ void dvb_usbv2_disconnect(struct usb_interface *intf) dvb_usbv2_exit(d); - dev_info(&dev, "%s: '%s' successfully deinitialized and disconnected\n", - KBUILD_MODNAME, name); + pr_info("%s: '%s:%s' successfully deinitialized and disconnected\n", + KBUILD_MODNAME, drvname, devname); + kfree(devname); } EXPORT_SYMBOL(dvb_usbv2_disconnect); -- cgit v1.2.3-55-g7522 From 3f190e3aec212fc8c61e202c51400afa7384d4bc Mon Sep 17 00:00:00 2001 From: Stefan Brüns Date: Sun, 5 Feb 2017 12:57:59 -0200 Subject: [media] cxusb: Use a dma capable buffer also for reading Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack") added a kmalloc'ed bounce buffer for writes, but missed to do the same for reads. As the read only happens after the write is finished, we can reuse the same buffer. As dvb_usb_generic_rw handles a read length of 0 by itself, avoid calling it using the dvb_usb_generic_read wrapper function. Signed-off-by: Stefan Brüns Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb/cxusb.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/dvb-usb/cxusb.c b/drivers/media/usb/dvb-usb/cxusb.c index 5d7b4eaa6a3c..51620e02292f 100644 --- a/drivers/media/usb/dvb-usb/cxusb.c +++ b/drivers/media/usb/dvb-usb/cxusb.c @@ -59,23 +59,24 @@ static int cxusb_ctrl_msg(struct dvb_usb_device *d, u8 cmd, u8 *wbuf, int wlen, u8 *rbuf, int rlen) { struct cxusb_state *st = d->priv; - int ret, wo; + int ret; if (1 + wlen > MAX_XFER_SIZE) { warn("i2c wr: len=%d is too big!\n", wlen); return -EOPNOTSUPP; } - wo = (rbuf == NULL || rlen == 0); /* write-only */ + if (rlen > MAX_XFER_SIZE) { + warn("i2c rd: len=%d is too big!\n", rlen); + return -EOPNOTSUPP; + } mutex_lock(&d->data_mutex); st->data[0] = cmd; memcpy(&st->data[1], wbuf, wlen); - if (wo) - ret = dvb_usb_generic_write(d, st->data, 1 + wlen); - else - ret = dvb_usb_generic_rw(d, st->data, 1 + wlen, - rbuf, rlen, 0); + ret = dvb_usb_generic_rw(d, st->data, 1 + wlen, st->data, rlen, 0); + if (!ret && rbuf && rlen) + memcpy(rbuf, st->data, rlen); mutex_unlock(&d->data_mutex); return ret; -- cgit v1.2.3-55-g7522 From 9165ba166cac5e8c9abda2012ea37cc3430c0b14 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 6 Feb 2017 04:47:36 -0200 Subject: [media] usbtv: add sharpness control Signed-off-by: Lubomir Rintel Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/usbtv/usbtv-video.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/media/usb') diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c index d3b6d3dfaa09..8135614f395a 100644 --- a/drivers/media/usb/usbtv/usbtv-video.c +++ b/drivers/media/usb/usbtv/usbtv-video.c @@ -757,6 +757,12 @@ static int usbtv_s_ctrl(struct v4l2_ctrl *ctrl) data[1] = -ctrl->val & 0xff; } break; + case V4L2_CID_SHARPNESS: + index = USBTV_BASE + 0x0239; + data[0] = 0; + data[1] = ctrl->val; + size = 2; + break; default: kfree(data); return -EINVAL; @@ -825,6 +831,8 @@ int usbtv_video_init(struct usbtv *usbtv) V4L2_CID_SATURATION, 0, 0x3ff, 1, 0x200); v4l2_ctrl_new_std(&usbtv->ctrl, &usbtv_ctrl_ops, V4L2_CID_HUE, -0xdff, 0xdff, 1, 0x000); + v4l2_ctrl_new_std(&usbtv->ctrl, &usbtv_ctrl_ops, + V4L2_CID_SHARPNESS, 0x0, 0xff, 1, 0x60); ret = usbtv->ctrl.error; if (ret < 0) { dev_warn(usbtv->dev, "Could not initialize controls\n"); -- cgit v1.2.3-55-g7522 From 0d1270df836fe9f5cc7e8001b7372ca4fa3f00f6 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 7 Feb 2017 11:01:41 -0200 Subject: [media] zd1301: fix building interface driver without demodulator If the USB driver is enabled but the demodulator is not, we get a link error: ERROR: "zd1301_demod_get_dvb_frontend" [drivers/media/usb/dvb-usb-v2/zd1301.ko] undefined! ERROR: "zd1301_demod_get_i2c_adapter" [drivers/media/usb/dvb-usb-v2/zd1301.ko] undefined! Such a configuration obviously makes no sense, but we should not fail the build. This tries to mimic what we have for other drivers by turning the build failure into a runtime failure. Alternatively we could use an unconditional 'select' or 'depends on' to enforce a sane configuration. Fixes: 47d65372b3b6 ("[media] zd1301_demod: ZyDAS ZD1301 DVB-T demodulator driver") Fixes: 992b39872b80 ("[media] zd1301: ZyDAS ZD1301 DVB USB interface driver") Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/zd1301_demod.h | 18 ++++++++++++++++++ drivers/media/usb/dvb-usb-v2/zd1301.c | 4 ++++ 2 files changed, 22 insertions(+) (limited to 'drivers/media/usb') diff --git a/drivers/media/dvb-frontends/zd1301_demod.h b/drivers/media/dvb-frontends/zd1301_demod.h index 78a3122e4942..ceb2e05e873c 100644 --- a/drivers/media/dvb-frontends/zd1301_demod.h +++ b/drivers/media/dvb-frontends/zd1301_demod.h @@ -34,6 +34,7 @@ struct zd1301_demod_platform_data { int (*reg_write)(void *, u16, u8); }; +#if IS_REACHABLE(CONFIG_DVB_ZD1301_DEMOD) /** * zd1301_demod_get_dvb_frontend() - Get pointer to DVB frontend * @pdev: Pointer to platform device @@ -52,4 +53,21 @@ struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *); struct i2c_adapter *zd1301_demod_get_i2c_adapter(struct platform_device *); +#else + +static inline struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *dev) +{ + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); + + return NULL; +} +static inline struct i2c_adapter *zd1301_demod_get_i2c_adapter(struct platform_device *dev) +{ + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); + + return NULL; +} + +#endif + #endif /* ZD1301_DEMOD_H */ diff --git a/drivers/media/usb/dvb-usb-v2/zd1301.c b/drivers/media/usb/dvb-usb-v2/zd1301.c index 563e50c6a327..d1eb4b7bc051 100644 --- a/drivers/media/usb/dvb-usb-v2/zd1301.c +++ b/drivers/media/usb/dvb-usb-v2/zd1301.c @@ -168,6 +168,10 @@ static int zd1301_frontend_attach(struct dvb_usb_adapter *adap) adapter = zd1301_demod_get_i2c_adapter(pdev); frontend = zd1301_demod_get_dvb_frontend(pdev); + if (!adapter || !frontend) { + ret = -ENODEV; + goto err_module_put_demod; + } /* Add I2C tuner */ dev->mt2060_pdata.i2c_write_max = 9; -- cgit v1.2.3-55-g7522