24 Sep, 2020

1 commit

  • Many hwmon drivers don't use the id information provided by the old
    i2c probe function, and the remainder can easily be adapted to the new
    form ("probe_new") by calling i2c_match_id explicitly.

    This avoids scanning the identifier tables during probes.

    Drivers which didn't use the id are converted as-is; drivers which did
    are modified as follows:

    * if the information in i2c_client is sufficient, that's used instead
    (client->name);
    * anything else is handled by calling i2c_match_id() with the same
    level of error-handling (if any) as before.

    A few drivers aren't included in this patch because they have a
    different set of maintainers. They will be covered by other patches.

    Signed-off-by: Stephen Kitt
    Link: https://lore.kernel.org/r/20200813160222.1503401-1-steve@sk2.org
    Signed-off-by: Guenter Roeck

    Stephen Kitt
     

24 Jul, 2020

1 commit

  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Link: https://lore.kernel.org/r/20200713140028.34775-1-grandmaster@al2klimov.de
    Signed-off-by: Guenter Roeck

    Alexander A. Klimov
     

24 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    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 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

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 441 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Michael Ellerman (powerpc)
    Reviewed-by: Richard Fontana
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

16 Apr, 2019

1 commit

  • Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
    to improve readbility, and to reduce the chance of inconsistencies.

    Also replace any remaining S_ in the driver with octal values.

    The conversion was done automatically with coccinelle. The semantic patches
    and the scripts used to generate this commit log are available at
    https://github.com/groeck/coccinelle-patches/.

    This patch does not introduce functional changes. It was verified by
    compiling the old and new files and comparing text and data sizes.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

03 Jan, 2017

1 commit

  • Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for
    read/write attributes. This simplifies the source code, improves
    readbility, and reduces the chance of inconsistencies.

    The conversion was done automatically using coccinelle. It was validated
    by compiling both the old and the new source code and comparing its text,
    data, and bss size.

    Signed-off-by: Julia Lawall
    [groeck: Updated description]
    Signed-off-by: Guenter Roeck

    Julia Lawall
     

10 Dec, 2016

1 commit


06 Aug, 2014

1 commit


04 Aug, 2014

2 commits


30 Jan, 2014

1 commit


22 Jul, 2012

1 commit


19 Mar, 2012

2 commits

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

    Signed-off-by: Axel Lin
    Cc: Corentin Labbe
    Cc: Dirk Eibach
    Cc: "Mark M. Hoffman"
    Cc: Steve Glendinning
    Cc: Riku Voipio
    Cc: Guillaume Ligneul
    Cc: David George
    Cc: "Hans J. Koch"
    Cc: Marc Hulsman
    Cc: Rudolf Marek
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • Fixed:
    ERROR: do not use assignment in if condition
    ERROR: space required after that ',' (ctx:VxV)
    ERROR: spaces required around that '
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

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 Dec, 2009

3 commits


10 Dec, 2009

1 commit


17 Jul, 2008

1 commit


19 Feb, 2008

1 commit


08 Feb, 2008

5 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
     
  • Many I2C hwmon drivers define a driver ID but no other code references
    these, meaning that they are useless. Discard them, along with a few
    IDs which are defined but never used at all.

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

    Jean Delvare
     
  • * Whitespace cleanups
    * Constify scaling constants
    * Fold long lines
    * Drop redundant initializations to 0
    * Rename new_client to just client
    * Use sysfs_create_group()
    * Drop a useless comment

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

    Jean Delvare
     
  • The future libsensors needs these individual alarm and fault files.

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

    Jean Delvare
     
  • This lets us get rid of macro-generated functions and shrinks the
    driver size by about 30%.

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

    Jean Delvare
     

10 Oct, 2007

2 commits


29 Sep, 2006

1 commit


24 Mar, 2006

1 commit

  • convert drivers/hwmon/*.c semaphore use to mutexes.

    the conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    all affected hwmon drivers were build-tested.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Ingo Molnar
     

06 Jan, 2006

4 commits


29 Oct, 2005

1 commit


06 Sep, 2005

6 commits

  • The only part left in i2c-sensor is the VRM/VRD/VID handling code.
    This is in no way related to i2c, so it doesn't belong there. Move
    the code to hwmon, where it belongs.

    Note that not all hardware monitoring drivers do VRM/VRD/VID
    operations, so less drivers depend on hwmon-vid than there were
    depending on i2c-sensor.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • The only thing left in i2c-sensor.h are module parameter definition
    macros. It's only an extension of what i2c.h offers, and this extension
    is not sensors-specific. As a matter of fact, a few non-sensors drivers
    use them. So we better merge them in i2c.h, and get rid of i2c-sensor.h
    altogether.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • i2c_probe and i2c_detect now do the exact same thing and operate on
    the same data structure, so we can have everyone call i2c_probe.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • We could refactor the error message 34 different i2c drivers print if
    i2c_detach_client() fails in this function itself. Saves quite a few
    lines of code. Documentation is updated to reflect that change.

    Note that this patch should be applied after Rudolf Marek's w83792d
    patches.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • Kill normal_isa in header files, documentation and all chip drivers, as
    it is no more used.

    normal_i2c could be renamed to normal, but I decided not to do so at the
    moment, so as to limit the number of changes. This might be done later
    as part of the i2c_probe/i2c_detect merge.

    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • This patch modifies sensors chip drivers to make use of the new
    sysfs class "hwmon".

    Signed-off-by: Mark M. Hoffman
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Mark M. Hoffman