13 Jan, 2012

1 commit


06 Jan, 2012

1 commit


31 Mar, 2011

1 commit


13 Jan, 2011

2 commits

  • This is the same case as fschmd, from which the code was copied as far
    as I can see. So the same clean-up applies:

    The WDIOC_GETSUPPORT ioctl only needs a mutex because it operates on a
    static variable. There is no good reason to keep this variable static,
    so let's just make it non-static and drop the now useless mutex
    altogether.

    See the discussion at:
    http://marc.info/?l=lm-sensors&m=125563869402323&w=2

    Signed-off-by: Jean Delvare
    Cc: Hans de Goede
    Acked-by: Guenter Roeck
    Acked-by: Arnd Bergmann
    Acked-by: Thomas Gleixner

    Jean Delvare
     
  • We have a standard intrusion detection interface now, drivers should
    implement it. I've left the old interface in place for the time being,
    with a deprecation warning, it will be removed later.

    Signed-off-by: Jean Delvare
    Acked-by: Guenter Roeck

    Jean Delvare
     

05 Oct, 2010

1 commit

  • All these files use the big kernel lock in a trivial
    way to serialize their private file operations,
    typically resulting from an earlier semi-automatic
    pushdown from VFS.

    None of these drivers appears to want to lock against
    other code, and they all use the BKL as the top-level
    lock in their file operations, meaning that there
    is no lock-order inversion problem.

    Consequently, we can remove the BKL completely,
    replacing it with a per-file mutex in every case.
    Using a scripted approach means we can avoid
    typos.

    These drivers do not seem to be under active
    maintainance from my brief investigation. Apologies
    to those maintainers that I have missed.

    file=$1
    name=$2
    if grep -q lock_kernel ${file} ; then
    if grep -q 'include.*linux.mutex.h' ${file} ; then
    sed -i '/include.*/d' ${file}
    else
    sed -i 's/include.*.*$/include /g' ${file}
    fi
    sed -i ${file} \
    -e "/^#include.*linux.mutex.h/,$ {
    1,/^\(static\|int\|long\)/ {
    /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

    } }" \
    -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
    -e '/[ ]*cycle_kernel_lock();/d'
    else
    sed -i -e '/include.*\/d' ${file} \
    -e '/cycle_kernel_lock()/d'
    fi

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

17 May, 2010

1 commit

  • These are the last remaining device drivers using
    the ->ioctl file operation in the drivers directory
    (except from v4l drivers).

    [fweisbec: drop i8k pushdown as it has been done from
    procfs pushdown branch already]

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Frederic Weisbecker

    Arnd Bergmann
     

30 Mar, 2010

1 commit


06 Mar, 2010

1 commit


15 Dec, 2009

3 commits


10 Dec, 2009

1 commit

  • As kind is now hard-coded to -1, there is room for code clean-ups.

    Signed-off-by: Jean Delvare
    Acked-by: Corentin Labbe
    Cc: "Mark M. Hoffman"
    Cc: Juerg Haefliger
    Cc: Riku Voipio
    Acked-by: "Hans J. Koch"
    Cc: Rudolf Marek

    Jean Delvare
     

07 Jan, 2009

1 commit

  • I2C_CLIENT_MODULE_PARM is overkill for force_subclients. We really
    only use 4 out of the 48 slots, so we're better defining a custom
    variable instead. This change saves 92 bytes of data for each of the
    five drivers affected.

    Signed-off-by: Jean Delvare
    Cc: Wolfgang Grandegger
    Acked-by: Marc Hulsman
    Cc: Mark M. Hoffman

    Jean Delvare
     

17 Jul, 2008

1 commit


27 Apr, 2008

1 commit

  • * Rework the device initialization function so as to read the
    "Multi-Function Pin Control" register (0x58) once instead of twice.
    I2C transactions aren't cheap so this speeds up the driver loading.

    * Only create the "vrm" attribute if at least one VID value is
    available.

    Signed-off-by: Jean Delvare
    Cc: Gong Jun
    Acked-by: Rudolf Marek
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     

19 Feb, 2008

1 commit


08 Feb, 2008

2 commits

  • What was true of reading the VRM value is also true of writing it: not
    being a register value, it doesn't need hardware access, so we don't
    need a reference to the i2c client. This allows for a minor code
    cleanup. As gcc appears to be smart enough to simplify the generated
    code by itself, this cleanup only affects the source code, the
    generated binaries are unchanged.

    Signed-off-by: Jean Delvare
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • Remove duplicated defines.

    Signed-off-by: Nicolas Kaiser
    Acked-by: Jean Delvare
    Signed-off-by: Mark M. Hoffman

    Nicolas Kaiser
     

10 Oct, 2007

1 commit


19 Jan, 2007

4 commits


13 Dec, 2006

1 commit