1. 08 Jun, 2024 33 commits
    • Javier Carrasco's avatar
      hwmon: (ltc2991) use device_for_each_child_node_scoped() · 234c0740
      Javier Carrasco authored
      Switch to the _scoped() version introduced in commit 365130fd
      ("device property: Introduce device_for_each_child_node_scoped()")
      to remove the need for manual calling of fwnode_handle_put() in the
      paths where the code exits the loop early.
      Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
      Link: https://lore.kernel.org/r/20240404-hwmon_device_for_each_child_node_scoped-v1-1-53997abde43c@gmail.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      234c0740
    • Andrew Davis's avatar
      hwmon: (w83795): Remove use of i2c_match_id() · 55076454
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-32-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      55076454
    • Andrew Davis's avatar
      hwmon: (w83781d) Remove use of i2c_match_id() · 00dcf379
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-31-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      00dcf379
    • Andrew Davis's avatar
      hwmon: (tmp464) Remove use of i2c_match_id() · 38a085f9
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-30-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      38a085f9
    • Andrew Davis's avatar
      hwmon: (tmp421) Remove use of i2c_match_id() · 8b6e514c
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-29-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      8b6e514c
    • Andrew Davis's avatar
      hwmon: (tmp401) Remove use of i2c_match_id() · 516d5765
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-28-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      516d5765
    • Andrew Davis's avatar
      hwmon: (thmc50) Remove use of i2c_match_id() · 50ba2d3d
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-27-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      50ba2d3d
    • Andrew Davis's avatar
      hwmon: (shtc1) Remove use of i2c_match_id() · 64306a47
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-26-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      64306a47
    • Andrew Davis's avatar
      hwmon: (sht3x) Remove use of i2c_match_id() · f147dbd7
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-25-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      f147dbd7
    • Andrew Davis's avatar
      hwmon: (powr1220) Remove use of i2c_match_id() · 77944b47
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-24-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      77944b47
    • Andrew Davis's avatar
      hwmon: (mcp3021) Remove use of i2c_match_id() · f1230f75
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-23-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      f1230f75
    • Andrew Davis's avatar
      hwmon: (max6697) Remove use of i2c_match_id() · de5fb06c
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-22-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      de5fb06c
    • Andrew Davis's avatar
      hwmon: (max1668) Remove use of i2c_match_id() · 495e6a9c
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-21-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      495e6a9c
    • Andrew Davis's avatar
      hwmon: (max16065) Remove use of i2c_match_id() · 5a71654b
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-20-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      5a71654b
    • Andrew Davis's avatar
      hwmon: (lm95234) Remove use of i2c_match_id() · e2791bdf
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-19-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      e2791bdf
    • Andrew Davis's avatar
      hwmon: (lm90) Remove use of i2c_match_id() · 711e2e4f
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-18-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      711e2e4f
    • Andrew Davis's avatar
      hwmon: (lm85) Remove use of i2c_match_id() · 4cfd3cee
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-17-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      4cfd3cee
    • Andrew Davis's avatar
      hwmon: (lm83) Remove use of i2c_match_id() · 9339bed9
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-16-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      9339bed9
    • Andrew Davis's avatar
      hwmon: (lm78) Remove use of i2c_match_id() · e49d1a1d
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-15-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      e49d1a1d
    • Andrew Davis's avatar
      hwmon: (lm75) Remove use of i2c_match_id() · 5178911d
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-14-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      5178911d
    • Andrew Davis's avatar
      hwmon: (lm63) Remove use of i2c_match_id() · cbc9b408
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-13-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      cbc9b408
    • Andrew Davis's avatar
      hwmon: (ina2xx) Remove use of i2c_match_id() · 8b839699
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-12-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      8b839699
    • Andrew Davis's avatar
      hwmon: (fschmd) Remove use of i2c_match_id() · 945e71d5
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-11-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      945e71d5
    • Andrew Davis's avatar
      hwmon: (f75375s) Remove use of i2c_match_id() · 72fdab6b
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-10-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      72fdab6b
    • Andrew Davis's avatar
      hwmon: (ds1621) Remove use of i2c_match_id() · 698d692c
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-9-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      698d692c
    • Andrew Davis's avatar
      hwmon: (dme1737) Remove use of i2c_match_id() · 9072777d
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-8-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      9072777d
    • Andrew Davis's avatar
      hwmon: (aht10) Remove use of i2c_match_id() · 941421c9
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-7-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      941421c9
    • Andrew Davis's avatar
      hwmon: (adt7475) Remove use of i2c_match_id() · 732d2624
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-6-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      732d2624
    • Andrew Davis's avatar
      hwmon: (ads7828) Remove use of i2c_match_id() · ec675563
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-5-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      ec675563
    • Andrew Davis's avatar
      hwmon: (adm1031) Remove use of i2c_match_id() · 0f1874f8
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-4-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      0f1874f8
    • Andrew Davis's avatar
      hwmon: (adm1021) Remove use of i2c_match_id() · 884369b2
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-3-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      884369b2
    • Andrew Davis's avatar
      hwmon: (ad7418) Remove use of i2c_match_id() · 244f1664
      Andrew Davis authored
      The function i2c_match_id() is used to fetch the matching ID from
      the i2c_device_id table. This is often used to then retrieve the
      matching driver_data. This can be done in one step with the helper
      i2c_get_match_data().
      
      This helper has a couple other benefits:
       * It doesn't need the i2c_device_id passed in so we do not need
         to have that forward declared, allowing us to remove those or
         move the i2c_device_id table down to its more natural spot
         with the other module info.
       * It also checks for device match data, which allows for OF and
         ACPI based probing. That means we do not have to manually check
         those first and can remove those checks.
      Signed-off-by: default avatarAndrew Davis <afd@ti.com>
      Link: https://lore.kernel.org/r/20240403203633.914389-2-afd@ti.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      244f1664
    • Krzysztof Kozlowski's avatar
      hwmon: lm70: simplify with spi_get_device_match_data() · b1ea8f7a
      Krzysztof Kozlowski authored
      Use spi_get_device_match_data() helper to simplify a bit the driver.
      Also kernel_ulong_t type is preferred for kernel code over uintptr_t
      (needed for the cast).
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Link: https://lore.kernel.org/r/20240606142515.132504-1-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      b1ea8f7a
  2. 04 Jun, 2024 6 commits
  3. 29 May, 2024 1 commit