13 Jan, 2012

2 commits

  • module_param(bool) used to counter-intuitively take an int. In
    fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
    trick.

    It's time to remove the int/unsigned int option. For this version
    it'll simply give a warning, but it'll break next kernel version.

    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • For historical reasons, we allow module_param(bool) to take an int (or
    an unsigned int). That's going away.

    A few drivers really want an int: they set it to -1 and a parameter
    will set it to 0 or 1. This sucks: reading them from sysfs will give
    'Y' for both -1 and 1, but if we change it to an int, then the users
    might be broken (if they did "param" instead of "param=1").

    Use a new 'bint' parser for them.

    (ntfs has a different problem: it needs an int for debug_msgs because
    it's also exposed via sysctl.)

    Cc: Steve Glendinning
    Cc: Jean Delvare
    Cc: Guenter Roeck
    Cc: Hoang-Nam Nguyen
    Cc: Christoph Raisch
    Cc: Roland Dreier
    Cc: Sean Hefty
    Cc: Hal Rosenstock
    Cc: linux390@de.ibm.com
    Cc: Anton Altaparmakov
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: lm-sensors@lm-sensors.org
    Cc: linux-rdma@vger.kernel.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-ntfs-dev@lists.sourceforge.net
    Cc: alsa-devel@alsa-project.org
    Acked-by: Takashi Iwai (For the sound part)
    Acked-by: Guenter Roeck (For the hwmon driver)
    Signed-off-by: Rusty Russell

    Rusty Russell
     

09 Jan, 2012

2 commits

  • * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
    max1111.c: fix checkpatch warning
    hwmon: (lm75) fix checkpatch warnings
    hwmon: (lm80) fix checkpatch messages
    hwmon: replaced strict_str* with kstr*
    hwmon: (lm75) fix checkpatch warning
    hwmon: (lm75) added error handling
    hwmon: (ltc4261) set data->valid to 0 if error
    hwmon: (f75375s) Add support for F75387SG/RG
    hwmon: (f75375s) Disable setting DC fan control mode for F75373
    hwmon: (f75375s) Initialize pwmX_mode and pwmX_enable if there is no platform data
    hwmon: (f75375s) Fix value range for PWM modes
    hwmon: (f75375s) Use standard sysfs attribute names
    hwmon: (f75375s) Fix checkpatch errors and warnings
    hwmon: (pmbus/zl6100) Only instantiate external temperature sensor if enabled
    hwmon: (pmbus/zl6100) Add support for Ericsson BMR45[0,1] and BMR46[2,3,4]
    hwmon: (pmbus/zl6100) Add support for ZL2005
    hwmon: (pmbus/adm1275) Validate device ID

    Linus Torvalds
     
  • * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
    reiserfs: Properly display mount options in /proc/mounts
    vfs: prevent remount read-only if pending removes
    vfs: count unlinked inodes
    vfs: protect remounting superblock read-only
    vfs: keep list of mounts for each superblock
    vfs: switch ->show_options() to struct dentry *
    vfs: switch ->show_path() to struct dentry *
    vfs: switch ->show_devname() to struct dentry *
    vfs: switch ->show_stats to struct dentry *
    switch security_path_chmod() to struct path *
    vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
    vfs: trim includes a bit
    switch mnt_namespace ->root to struct mount
    vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
    vfs: opencode mntget() mnt_set_mountpoint()
    vfs: spread struct mount - remaining argument of next_mnt()
    vfs: move fsnotify junk to struct mount
    vfs: move mnt_devname
    vfs: move mnt_list to struct mount
    vfs: switch pnode.h macros to struct mount *
    ...

    Linus Torvalds
     

07 Jan, 2012

1 commit

  • * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86: Skip cpus with apic-ids >= 255 in !x2apic_mode
    x86, x2apic: Allow "nox2apic" to disable x2apic mode setup by BIOS
    x86, x2apic: Fallback to xapic when BIOS doesn't setup interrupt-remapping
    x86, acpi: Skip acpi x2apic entries if the x2apic feature is not present
    x86, apic: Add probe() for apic_flat
    x86: Simplify code by removing a !SMP #ifdefs from 'struct cpuinfo_x86'
    x86: Convert per-cpu counter icr_read_retry_count into a member of irq_stat
    x86: Add per-cpu stat counter for APIC ICR read tries
    pci, x86/io-apic: Allow PCI_IOAPIC to be user configurable on x86
    x86: Fix the !CONFIG_NUMA build of the new CPU ID fixup code support
    x86: Add NumaChip support
    x86: Add x86_init platform override to fix up NUMA core numbering
    x86: Make flat_init_apic_ldr() available

    Linus Torvalds
     

06 Jan, 2012

17 commits


04 Jan, 2012

2 commits


21 Dec, 2011

1 commit

  • Several fields in struct cpuinfo_x86 were not defined for the
    !SMP case, likely to save space. However, those fields still
    have some meaning for UP, and keeping them allows some #ifdef
    removal from other files. The additional size of the UP kernel
    from this change is not significant enough to worry about
    keeping up the distinction:

    text data bss dec hex filename
    4737168 506459 972040 6215667 5ed7f3 vmlinux.o.before
    4737444 506459 972040 6215943 5ed907 vmlinux.o.after

    for a difference of 276 bytes for an example UP config.

    If someone wants those 276 bytes back badly then it should
    be implemented in a cleaner way.

    Signed-off-by: Kevin Winchester
    Cc: Steffen Persvold
    Link: http://lkml.kernel.org/r/1324428742-12498-1-git-send-email-kjwinchester@gmail.com
    Signed-off-by: Ingo Molnar

    Kevin Winchester
     

13 Dec, 2011

2 commits


27 Nov, 2011

1 commit

  • This patch converts the drivers in drivers/hwmon/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Cc: Donggeun Kim
    Cc: Simon Guinot
    Cc: Lars-Peter Clausen
    Cc: MyungJoo Ham
    Cc: Ben Dooks
    Cc: Hans de Goede
    Cc: J Keerthy
    Cc: David S. Miller
    Cc: Mark Brown
    Signed-off-by: Axel Lin
    Acked-by: Mark Brown
    Signed-off-by: Guenter Roeck

    Axel Lin
     

25 Nov, 2011

1 commit

  • In ancient times it was necessary to manually initialize the bus field of an
    spi_driver to spi_bus_type. These days this is done in spi_register_driver(),
    so we can drop the manual assignment.

    The patch was generated using the following coccinelle semantic patch:
    //
    @@
    identifier _driver;
    @@
    struct spi_driver _driver = {
    .driver = {
    - .bus = &spi_bus_type,
    },
    };
    //

    Signed-off-by: Lars-Peter Clausen
    Cc: Jean Delvare
    Cc: Guenter Roeck
    Cc: lm-sensors@lm-sensors.org
    Signed-off-by: Guenter Roeck

    Lars-Peter Clausen
     

17 Nov, 2011

1 commit


07 Nov, 2011

3 commits

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     
  • Commit 2265cef2 (hwmon: (w83627ehf) Properly report PECI and AMD-SI
    sensor types) results in kernel panic if data->temp_label was not
    initialized.
    The problem was found with chip W83627DHG-P.

    Add check if data->temp->label was set before use.

    Based on incomplete patch by Alexander Beregalov.

    Reported-by: Alexander Beregalov
    Tested-by: Alexander Beregalov
    Cc: stable@kernel.org
    Signed-off-by: Guenter Roeck
    Signed-off-by: Jean Delvare

    Guenter Roeck
     
  • The definition of TO_ATTR_NO in the non-SMP case is wrong. As the SMP
    definition resolves to the correct value, just use this for both
    cases.

    Without this fix the temperature attributes are named temp0_* instead
    of temp2_*, so libsensors won't pick them. Broken since kernel 3.0.

    Signed-off-by: Jean Delvare
    Tested-by: Phil Sutter
    Cc: stable@kernel.org
    Acked-by: Durgadoss R
    Acked-by: Guenter Roeck

    Jean Delvare
     

04 Nov, 2011

7 commits

  • This is essentially a stripped down version of the W83627DHG. Noticeable
    difference is that it is still powered with +5V, as older models, even
    though the ADC resolution is 8 mV as newer models have.

    Thanks to Ulf Bruman (Saab Group) for doing all the testing.

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

    Jean Delvare
     
  • The probe function has grown pretty large, I think it's time for some
    cleanups, starting with these two simple ones:
    * Move temp3/in6 check for the W83667HG later in the function, where
    it is done for all other chip types.
    * Move temperature register setting to a separate function, to avoid
    code duplication.

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

    Jean Delvare
     
  • When temperature sources are PECI or AMD-SI agents, it makes no sense
    to report their type as diode or thermistor. Instead we must report
    their digital nature.

    Signed-off-by: Jean Delvare
    Cc: stable@kernel.org
    Acked-by: Guenter Roeck

    Jean Delvare
     
  • Make use of the new i2c_smbus_{read,write}_word_swapped functions.
    This makes the driver code more compact and readable. It also ensures
    proper error handling.

    Signed-off-by: Jean Delvare
    Acked-by: Jonathan Cameron
    Acked-by: Guenter Roeck
    Cc: Dirk Eibach
    Cc: "Mark M. Hoffman"
    Cc: Guillaume Ligneul

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

    Jean Delvare
     
  • Clean up the code to make it more readable:
    * Remove reg_ and new_ prefixes from variable names, they made the
    names longer, causing extra line breaks, while not adding much
    value.
    * Introduce struct device dev* = &client->dev in two functions, to
    avoid repeating client->dev everywhere in these functions.

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

    Jean Delvare
     
  • With some configuration option combinations, we get the following
    warnings:

    drivers/hwmon/lm90.c: In function 'lm90_detect':
    drivers/hwmon/lm90.c:1114: warning: 'chip_id' may be used uninitialized
    in this function
    drivers/hwmon/lm90.c:1114: warning: 'reg_config1' may be used
    uninitialized in this function
    drivers/hwmon/lm90.c:1114: warning: 'reg_convrate' may be used
    uninitialized in this function
    drivers/hwmon/lm90.c:1187: warning: 'reg_emerg2' may be used
    uninitialized in this function
    drivers/hwmon/lm90.c:1187: warning: 'reg_status2' may be used
    uninitialized in this function

    We can solve these easily by reading the register values first and
    checking for errors later. These errors should be very rare, even in
    the case of failed detection, so this change has no impact on
    performance. And this makes checkpatch.pl happier.

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

    Jean Delvare