31 Dec, 2011

8 commits


18 Dec, 2011

1 commit

  • Hauppauge RC-5 tables require the full scancodes. The code at budget-ci
    handles it right, however, it request the rc-code to mask them with 0xff,
    breaking support for some remote controllers.

    Fix it by not selecting a scancode mask when the driver is on full_rc5 mode.

    Reported-by: Brian May
    Tested-by: Brian May
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

25 Nov, 2011

1 commit

  • Smatch complains that the wrong limiter is used here:
    drivers/media/dvb/ttpci/av7110.c +906 dvb_feed_start_pid(12)
    error: buffer overflow 'npids' 5 pes_type;
    906 npids[i] = (pid[i]&0x8000) ? 0 : pid[i];

    "npids" is a 5 element array declared on the stack. If
    dvbdmxfeed->pes_type is more than 4 we probably put a (u16)0 past
    the end of the array.

    If dvbdmxfeed->pes_type is over 4 the rest of the function doesn't
    do anything. dvbdmxfeed->pes_type is capped at less than
    DMX_TS_PES_OTHER (20) in the caller function, but I changed it to
    less than or equal to DMX_TS_PES_PCR (4).

    Signed-off-by: Dan Carpenter
    Acked-by: Oliver Endriss
    Signed-off-by: Mauro Carvalho Chehab

    Dan Carpenter
     

25 Sep, 2011

1 commit


24 Sep, 2011

1 commit


04 Sep, 2011

2 commits

  • Standardize the mechanisms to emit logging messages.

    A few other modules used an #include from saa7146,
    convert those at the same time.

    Add pr_fmt.
    Convert printks to pr_
    Convert printks without KERN_ to appropriate pr_.
    Convert logging macros requiring multiple parentheses to normal style.
    Removed embedded prefixes when pr_fmt was added.
    Whitespace cleanups when around other conversions.
    Use printf extension %pM to print mac address.
    Coalesce format strings.

    Signed-off-by: Joe Perches
    Acked-by: Michael Hunold
    Signed-off-by: Mauro Carvalho Chehab

    Joe Perches
     
  • Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg
    Date: Mon Oct 15 22:25:06 2007 +0200

    kbuild: introduce ccflags-y, asflags-y and ldflags-y

    Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
    line use. By default, gmake(1) do not override command line setting, so this is
    likely to result in build failure or unexpected behavior.

    Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

    Cc: Sam Ravnborg
    Cc: Mauro Carvalho Chehab
    Cc: linux-media@vger.kernel.org
    Signed-off-by: Arnaud Lacombe
    Acked-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Arnaud Lacombe
     

27 Aug, 2011

1 commit


20 May, 2011

1 commit


31 Mar, 2011

1 commit


23 Mar, 2011

1 commit

  • The rc-hauppauge-new map is a messy thing, as it bundles 3

    different remote controllers as if they were just one,
    discarding the address byte. Also, some key maps are wrong.

    With the conversion to the new rc-core, it is likely that
    most of the devices won't be working properly, as the i2c
    driver and the raw decoders are now providing 16 bits for
    the remote, instead of just 8.

    delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jarod Wilson

    Mauro Carvalho Chehab
     

19 Jan, 2011

1 commit


30 Dec, 2010

1 commit

  • The v4l core sets the v4l2_input.capabilities field based on the supplied
    v4l2_ioctl_ops. However, several drivers do a memset or memcpy of the v4l2_input
    struct, thus overwriting that field incorrectly.

    Either remove the memset (which is already done by the v4l core), or add the
    proper capabilities field in case of a memcpy.

    The same is also true for v4l2_output, but that only affected the ivtv driver.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

29 Dec, 2010

5 commits

  • These devices do not return the full command+address, so set
    scanmask accordingly.

    Signed-off-by: David Henningsson
    Signed-off-by: Mauro Carvalho Chehab

    David Henningsson
     
  • Those functions are not InfraRed specific. So, rename them to properly
    reflect it.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The Remote Controller subsystem is meant to be used not only by Infra Red
    but also for similar types of Remote Controllers. The core is not specific
    to Infra Red. As such, rename:
    - ir-core.h to rc-core.h
    - IR_CORE to RC_CORE
    - namespace inside rc-core.c/rc-core.h

    To be consistent with the other changes.

    No functional change on this patch.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • This patch merges the ir_input_dev and ir_dev_props structs into a single
    struct called rc_dev. The drivers and various functions in rc-core used
    by the drivers are also changed to use rc_dev as the primary interface
    when dealing with rc-core.

    This means that the input_dev is abstracted away from the drivers which
    is necessary if we ever want to support multiple input devs per rc device.

    The new API is similar to what the input subsystem uses, i.e:
    rc_device_alloc()
    rc_device_free()
    rc_device_register()
    rc_device_unregister()

    [mchehab@redhat.com: Fix compilation on mceusb and cx231xx, due to merge conflicts]
    Signed-off-by: David Härdeman
    Acked-by: Jarod Wilson
    Tested-by: Jarod Wilson
    Signed-off-by: Mauro Carvalho Chehab

    David Härdeman
     
  • cx88 only depends on VIDEO_IR because it needs ir_extract_bits().
    Move that function to ir-core.h and make it inline.

    Lots of drivers had dependencies on VIDEO_IR when they really
    wanted IR_CORE.

    The only remaining drivers to depend on VIDEO_IR are bt8xx and
    saa7134 (ir_rc5_timer_end is the only function exported by
    ir-functions).

    Rename VIDEO_IR -> IR_LEGACY to give a hint to anyone writing or
    converting drivers to IR_CORE that they do not want a dependency
    on IR_LEGACY.

    Signed-off-by: David Härdeman
    Acked-by: Jarod Wilson
    Signed-off-by: Mauro Carvalho Chehab

    David Härdeman
     

29 Oct, 2010

1 commit

  • * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits)
    [media] af9015: Fix max I2C message size when used with tda18271
    [media] IR: initialize ir_raw_event in few more drivers
    [media] Guard a divide in v4l1 compat layer
    [media] imon: fix nomouse modprobe option
    [media] imon: remove redundant change_protocol call
    [media] imon: fix my egregious brown paper bag w/rdev/idev split
    [media] cafe_ccic: Configure ov7670 correctly
    [media] ov7670: allow configuration of image size, clock speed, and I/O method
    [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016]
    [media] af9015: map DigitalNow TinyTwin v2 remote
    [media] DigitalNow TinyTwin remote controller
    [media] af9015: RC fixes and improvements
    videodev2.h.xml: Update to reflect the latest changes at videodev2.h
    [media] v4l: document new Bayer and monochrome pixel formats
    [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028
    [media] firedtv: add parameter to fake ca_system_ids in CA_INFO
    [media] tm6000: fix a macro coding style issue
    tm6000: Remove some ugly debug code
    [media] Nova-S-Plus audio line input
    [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers
    ...

    Linus Torvalds
     

25 Oct, 2010

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    Update broken web addresses in arch directory.
    Update broken web addresses in the kernel.
    Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
    Revert "Fix typo: configuation => configuration" partially
    ida: document IDA_BITMAP_LONGS calculation
    ext2: fix a typo on comment in ext2/inode.c
    drivers/scsi: Remove unnecessary casts of private_data
    drivers/s390: Remove unnecessary casts of private_data
    net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
    drivers/infiniband: Remove unnecessary casts of private_data
    drivers/gpu/drm: Remove unnecessary casts of private_data
    kernel/pm_qos_params.c: Remove unnecessary casts of private_data
    fs/ecryptfs: Remove unnecessary casts of private_data
    fs/seq_file.c: Remove unnecessary casts of private_data
    arm: uengine.c: remove C99 comments
    arm: scoop.c: remove C99 comments
    Fix typo configue => configure in comments
    Fix typo: configuation => configuration
    Fix typo interrest[ing|ed] => interest[ing|ed]
    Fix various typos of valid in comments
    ...

    Fix up trivial conflicts in:
    drivers/char/ipmi/ipmi_si_intf.c
    drivers/usb/gadget/rndis.c
    net/irda/irnet/irnet_ppp.c

    Linus Torvalds
     

21 Oct, 2010

3 commits

  • This patch changes the name of the av7110 driver from the
    generic "dvb" to "av7110", to be descriptive of the driver.

    I've included Oliver Endriss's ack from the original post, which
    contained a mangled patch. The content of the patch is unchanged.

    Signed-off-by: Derek Kelly
    Acked-by: Oliver Endriss
    Signed-off-by: Mauro Carvalho Chehab

    Derek Kelly
     
  • Extend the error handling code with operations found in other nearby error
    handling code.

    A simplified version of the sematic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @r exists@
    @r@
    statement S1,S2,S3;
    constant C1,C2,C3;
    @@

    *if (...)
    {... S1 return -C1;}
    ...
    *if (...)
    {... when != S1
    return -C2;}
    ...
    *if (...)
    {... S1 return -C3;}
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • Detection class I2C_CLASS_TV_DIGITAL is set by many adapters but no
    I2C device driver is setting it anymore, which means it can be
    dropped. I2C devices on digital TV adapters are instantiated
    explicitly these days, which is much better.

    Signed-off-by: Jean Delvare
    Signed-off-by: Mauro Carvalho Chehab

    Jean Delvare
     

18 Oct, 2010

1 commit

  • The patch below updates broken web addresses in the kernel

    Signed-off-by: Justin P. Mattock
    Cc: Maciej W. Rozycki
    Cc: Geert Uytterhoeven
    Cc: Finn Thain
    Cc: Randy Dunlap
    Cc: Matt Turner
    Cc: Dimitry Torokhov
    Cc: Mike Frysinger
    Acked-by: Ben Pfaff
    Acked-by: Hans J. Koch
    Reviewed-by: Finn Thain
    Signed-off-by: Jiri Kosina

    Justin P. Mattock
     

15 Oct, 2010

1 commit

  • All file_operations should get a .llseek operation so we can make
    nonseekable_open the default for future file operations without a
    .llseek pointer.

    The three cases that we can automatically detect are no_llseek, seq_lseek
    and default_llseek. For cases where we can we can automatically prove that
    the file offset is always ignored, we use noop_llseek, which maintains
    the current behavior of not returning an error from a seek.

    New drivers should normally not use noop_llseek but instead use no_llseek
    and call nonseekable_open at open time. Existing drivers can be converted
    to do the same when the maintainer knows for certain that no user code
    relies on calling seek on the device file.

    The generated code is often incorrectly indented and right now contains
    comments that clarify for each added line why a specific variant was
    chosen. In the version that gets submitted upstream, the comments will
    be gone and I will manually fix the indentation, because there does not
    seem to be a way to do that using coccinelle.

    Some amount of new code is currently sitting in linux-next that should get
    the same modifications, which I will do at the end of the merge window.

    Many thanks to Julia Lawall for helping me learn to write a semantic
    patch that does all this.

    ===== begin semantic patch =====
    // This adds an llseek= method to all file operations,
    // as a preparation for making no_llseek the default.
    //
    // The rules are
    // - use no_llseek explicitly if we do nonseekable_open
    // - use seq_lseek for sequential files
    // - use default_llseek if we know we access f_pos
    // - use noop_llseek if we know we don't access f_pos,
    // but we still want to allow users to call lseek
    //
    @ open1 exists @
    identifier nested_open;
    @@
    nested_open(...)
    {

    }

    @ open exists@
    identifier open_f;
    identifier i, f;
    identifier open1.nested_open;
    @@
    int open_f(struct inode *i, struct file *f)
    {

    }

    @ read disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {

    }

    @ read_no_fpos disable optional_qualifier exists @
    identifier read_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ write @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    expression E;
    identifier func;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {

    }

    @ write_no_fpos @
    identifier write_f;
    identifier f, p, s, off;
    type ssize_t, size_t, loff_t;
    @@
    ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
    {
    ... when != off
    }

    @ fops0 @
    identifier fops;
    @@
    struct file_operations fops = {
    ...
    };

    @ has_llseek depends on fops0 @
    identifier fops0.fops;
    identifier llseek_f;
    @@
    struct file_operations fops = {
    ...
    .llseek = llseek_f,
    ...
    };

    @ has_read depends on fops0 @
    identifier fops0.fops;
    identifier read_f;
    @@
    struct file_operations fops = {
    ...
    .read = read_f,
    ...
    };

    @ has_write depends on fops0 @
    identifier fops0.fops;
    identifier write_f;
    @@
    struct file_operations fops = {
    ...
    .write = write_f,
    ...
    };

    @ has_open depends on fops0 @
    identifier fops0.fops;
    identifier open_f;
    @@
    struct file_operations fops = {
    ...
    .open = open_f,
    ...
    };

    // use no_llseek if we call nonseekable_open
    ////////////////////////////////////////////
    @ nonseekable1 depends on !has_llseek && has_open @
    identifier fops0.fops;
    identifier nso ~= "nonseekable_open";
    @@
    struct file_operations fops = {
    ... .open = nso, ...
    +.llseek = no_llseek, /* nonseekable */
    };

    @ nonseekable2 depends on !has_llseek @
    identifier fops0.fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ... .open = open_f, ...
    +.llseek = no_llseek, /* open uses nonseekable */
    };

    // use seq_lseek for sequential files
    /////////////////////////////////////
    @ seq depends on !has_llseek @
    identifier fops0.fops;
    identifier sr ~= "seq_read";
    @@
    struct file_operations fops = {
    ... .read = sr, ...
    +.llseek = seq_lseek, /* we have seq_read */
    };

    // use default_llseek if there is a readdir
    ///////////////////////////////////////////
    @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier readdir_e;
    @@
    // any other fop is used that changes pos
    struct file_operations fops = {
    ... .readdir = readdir_e, ...
    +.llseek = default_llseek, /* readdir is present */
    };

    // use default_llseek if at least one of read/write touches f_pos
    /////////////////////////////////////////////////////////////////
    @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read.read_f;
    @@
    // read fops use offset
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = default_llseek, /* read accesses f_pos */
    };

    @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ... .write = write_f, ...
    + .llseek = default_llseek, /* write accesses f_pos */
    };

    // Use noop_llseek if neither read nor write accesses f_pos
    ///////////////////////////////////////////////////////////

    @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    identifier write_no_fpos.write_f;
    @@
    // write fops use offset
    struct file_operations fops = {
    ...
    .write = write_f,
    .read = read_f,
    ...
    +.llseek = noop_llseek, /* read and write both use no f_pos */
    };

    @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier write_no_fpos.write_f;
    @@
    struct file_operations fops = {
    ... .write = write_f, ...
    +.llseek = noop_llseek, /* write uses no f_pos */
    };

    @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    identifier read_no_fpos.read_f;
    @@
    struct file_operations fops = {
    ... .read = read_f, ...
    +.llseek = noop_llseek, /* read uses no f_pos */
    };

    @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
    identifier fops0.fops;
    @@
    struct file_operations fops = {
    ...
    +.llseek = noop_llseek, /* no read or write fn */
    };
    ===== End semantic patch =====

    Signed-off-by: Arnd Bergmann
    Cc: Julia Lawall
    Cc: Christoph Hellwig

    Arnd Bergmann
     

13 Aug, 2010

1 commit

  • warning: (VIDEO_BT848 && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_DEV && PCI && I2C && VIDEO_V4L2 && INPUT || VIDEO_SAA7134 && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && VIDEO_DEV && PCI && I2C && INPUT || VIDEO_CX88 && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && VIDEO_DEV && PCI && I2C && INPUT || VIDEO_IVTV && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && PCI && I2C && INPUT || VIDEO_CX18 && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && DVB_CORE && PCI && I2C && EXPERIMENTAL && INPUT || VIDEO_EM28XX && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && V4L_USB_DRIVERS && USB && VIDEO_DEV && I2C && INPUT || VIDEO_TLG2300 && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && V4L_USB_DRIVERS && USB && VIDEO_DEV && I2C && INPUT && SND && DVB_CORE || VIDEO_CX231XX && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && V4L_USB_DRIVERS && USB && VIDEO_DEV && I2C && INPUT || DVB_BUDGET_CI && MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && DVB_BUDGET_CORE && I2C && INPUT || DVB_DM1105 && MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && PCI && I2C && INPUT || VIDEO_GO7007 && STAGING && !STAGING_EXCLUDE_BUILD && VIDEO_DEV && PCI && I2C && INPUT && SND || VIDEO_CX25821 && STAGING && !STAGING_EXCLUDE_BUILD && DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT) selects VIDEO_IR which has unmet direct dependencies (IR_CORE)

    Acked-by: Randy Dunlap
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

01 Jun, 2010

2 commits


24 May, 2010

1 commit

  • * 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
    uml: Pushdown the bkl from harddog_kern ioctl
    sunrpc: Pushdown the bkl from sunrpc cache ioctl
    sunrpc: Pushdown the bkl from ioctl
    autofs4: Pushdown the bkl from ioctl
    uml: Convert to unlocked_ioctls to remove implicit BKL
    ncpfs: BKL ioctl pushdown
    coda: Clean-up whitespace problems in pioctl.c
    coda: BKL ioctl pushdown
    drivers: Push down BKL into various drivers
    isdn: Push down BKL into ioctl functions
    scsi: Push down BKL into ioctl functions
    dvb: Push down BKL into ioctl functions
    smbfs: Push down BKL into ioctl function
    coda/psdev: Remove BKL from ioctl function
    um/mmapper: Remove BKL usage
    sn_hwperf: Kill BKL usage
    hfsplus: Push down BKL into ioctl function

    Linus Torvalds
     

19 May, 2010

4 commits

  • Never call dvb_frontend_detach if we failed to attach a frontend. This fixes
    the following oops:

    [ 8.172997] DVB: registering new adapter (TT-Budget S2-1600 PCI)
    [ 8.209018] adapter has MAC addr = 00:d0:5c:cc:a7:29
    [ 8.328665] Intel ICH 0000:00:1f.5: PCI INT B -> GSI 17 (level, low) -> IRQ 17
    [ 8.328753] Intel ICH 0000:00:1f.5: setting latency timer to 64
    [ 8.562047] DVB: Unable to find symbol stv090x_attach()
    [ 8.562117] BUG: unable to handle kernel NULL pointer dereference at 000000ac
    [ 8.562239] IP: [] dvb_frontend_detach+0x4/0x67 [dvb_core]

    Ref http://bugs.debian.org/575207

    Also clean up if we are unable to register the tuner and LNB drivers

    [mchehab@redhat.com: add printk log level, to calm down chechpatch.pl]
    Signed-off-by: Bjørn Mork
    Reported-by: Fladischer Michael
    Acked-by: Oliver Endriss
    Signed-off-by: Mauro Carvalho Chehab

    Bjørn Mork
     
  • Converts drivers/media/dvb/ttpci/budget-ci.c to use ir-core rather than
    rolling its own keydown timeout handler and reporting keys via
    drivers/media/IR/ir-functions.c.

    [mchehab@redhat.com: Drop the call to ir_input_init() as it is no longer needed]

    Signed-off-by: David Härdeman
    Signed-off-by: Mauro Carvalho Chehab

    David Härdeman
     
  • Instead of using the ugly keymap sequences, use the new rc-*.ko keymap
    files. For now, it is still needed to have one keymap loaded, for the
    RC code to work. Later patches will remove this depenency.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • A latter patch will reuse the ir_input_register with a different meaning.
    Before it, change all occurrences to a temporary name.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab