Centos-kernel-stream-9/drivers/hwmon
d.marlin 1966a7e2e4 hwmon: (pwm-fan) Use HWMON_CHANNEL_INFO macro
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2141743
Tested: Sanity testing only, due to lack of hardware.

commit 7282d2aefcc6cc3ab093968df108f399f93e69e8
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Thu May 12 12:05:59 2022 -0700

    hwmon: (pwm-fan) Use HWMON_CHANNEL_INFO macro

    The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood
    of errors, and makes the code easier to read.

    The conversion was done automatically with coccinelle. The semantic patch
    used to make this change is as follows.

    @s@
    identifier i,j,ty;
    @@

    -struct hwmon_channel_info j = {
    -       .type = ty,
    -       .config = i,
    -};

    @r@
    initializer list elements;
    identifier s.i;
    @@

    -u32 i[] = {
    -  elements,
    -  0
    -};

    @script:ocaml t@
    ty << s.ty;
    elements << r.elements;
    shorter;
    elems;
    @@

    shorter :=
       make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty)));
    elems :=
       make_ident
        (String.concat ","
         (List.map (fun x -> Printf.sprintf "\n\t\t\t   %s" x)
           (Str.split (Str.regexp " , ") elements)))

    @@
    identifier s.j,t.shorter;
    identifier t.elems;
    @@

    - &j
    + HWMON_CHANNEL_INFO(shorter,elems)

    This patch does not introduce functional changes. Many thanks to
    Julia Lawall for providing the coccinelle script.

    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    (cherry picked from commit 7282d2aefcc6cc3ab093968df108f399f93e69e8)

Signed-off-by: d.marlin <dmarlin@redhat.com>
2022-12-12 09:58:17 -06:00
..
occ mm: move kvmalloc-related functions to slab.h 2022-03-27 00:48:02 -04:00
pmbus hwmon: (pmbus/dps920ab) Delete some dead code 2021-06-18 12:45:58 -07:00
Kconfig hwmon: Add sht4x Temperature and Humidity Sensor Driver 2021-06-17 04:21:45 -07:00
Makefile hwmon: Add sht4x Temperature and Humidity Sensor Driver 2021-06-17 04:21:45 -07:00
abituguru.c
abituguru3.c
acpi_power_meter.c hwmon: (acpi_power_meter) Use acpi_bus_get_acpi_device() 2022-05-05 14:57:10 -04:00
ad7314.c
ad7414.c
ad7418.c
adc128d818.c
adcxx.c
adm1021.c
adm1025.c
adm1026.c
adm1029.c
adm1031.c
adm1177.c
adm9240.c hwmon: (adm9240) Fix writes into inX_max attributes 2021-05-12 18:53:11 -07:00
ads7828.c
ads7871.c
adt7x10.c
adt7x10.h
adt7310.c
adt7410.c
adt7411.c
adt7462.c
adt7470.c
adt7475.c
aht10.c
amc6821.c
applesmc.c
as370-hwmon.c
asb100.c
asc7621.c
aspeed-pwm-tacho.c
asus_atk0110.c
atxp1.c
axi-fan-control.c
bt1-pvt.c hwmon: (bt1-pvt) Remove redundant error printing in pvt_request_regs() 2021-06-17 04:21:45 -07:00
bt1-pvt.h
coretemp.c
corsair-cpro.c hwmon: (corsair-cpro) Fix fall-through warnings for Clang 2021-05-17 19:50:23 -05:00
corsair-psu.c hwmon: (corsair-psu) fix suspend behavior 2021-06-09 11:51:30 -07:00
da9052-hwmon.c
da9055-hwmon.c
dell-smm-hwmon.c hwmon: Replace deprecated CPU-hotplug functions. 2021-12-09 09:04:12 -05:00
dme1737.c
drivetemp.c
ds620.c
ds1621.c
emc6w201.c
emc1403.c
emc2103.c
f71805f.c
f71882fg.c
f75375s.c
fam15h_power.c hwmon: Replace deprecated CPU-hotplug functions. 2021-12-09 09:04:12 -05:00
fschmd.c
ftsteutates.c
g760a.c
g762.c
gl518sm.c
gl520sm.c
gpio-fan.c
gsc-hwmon.c
hih6130.c
hwmon-vid.c
hwmon.c hwmon: Introduce hwmon_device_register_for_thermal 2022-10-29 11:48:30 -06:00
i5k_amb.c
i5500_temp.c
ibmaem.c
ibmpex.c
ibmpowernv.c
iio_hwmon.c
ina2xx.c
ina209.c
ina3221.c hwmon: (ina3221) use CVRF only for single-shot conversion 2021-06-17 04:21:46 -07:00
intel-m10-bmc-hwmon.c
it87.c
jc42.c
k8temp.c
k10temp.c hwmon: (k10temp) Support up to 12 CCDs on AMD Family of processors 2022-01-26 08:22:05 -05:00
lineage-pem.c
lm63.c
lm70.c hwmon: (lm70) Use SPI_MODE_X_MASK 2021-06-17 04:21:44 -07:00
lm73.c
lm75.c hwmon: (lm75) Add TI TMP1075 support 2021-06-17 04:21:44 -07:00
lm75.h
lm77.c
lm78.c
lm80.c Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe" 2021-05-13 17:30:01 +02:00
lm83.c
lm85.c
lm87.c
lm90.c hwmon: (lm90) Prevent integer underflows of temperature calculations 2021-06-24 07:14:27 -07:00
lm92.c
lm93.c
lm95234.c
lm95241.c
lm95245.c
lochnagar-hwmon.c
ltc2945.c
ltc2947-core.c
ltc2947-i2c.c
ltc2947-spi.c
ltc2947.h
ltc2990.c
ltc2992.c hwmon: (ltc2992) Put fwnode in error case during ->probe() 2021-05-10 08:02:15 -07:00
ltc4151.c
ltc4215.c
ltc4222.c
ltc4245.c
ltc4260.c
ltc4261.c
ltq-cputemp.c
max127.c
max197.c
max1111.c
max1619.c
max1668.c
max6621.c hwmon: (max6621) Fix fall-through warnings for Clang 2021-05-17 19:50:37 -05:00
max6639.c
max6642.c
max6650.c
max6697.c
max16065.c
max31722.c hwmon: (max31722) Remove non-standard ACPI device IDs 2021-06-17 04:21:44 -07:00
max31730.c
max31790.c hwmon: (max31790) Detect and report zero fan speed 2021-06-17 04:21:46 -07:00
mc13783-adc.c
mcp3021.c
menf21bmc_hwmon.c
mlxreg-fan.c hwmon: (mlxreg-fan) Use pwm attribute for setting fan speed low limit 2022-11-13 19:04:17 +01:00
mr75203.c
nct6683.c
nct6775.c
nct7802.c
nct7904.c
npcm750-pwm-fan.c
nsa320-hwmon.c
ntc_thermistor.c hwmon: (ntc_thermistor) Drop unused headers. 2021-06-17 04:21:47 -07:00
nzxt-kraken2.c
pc87360.c
pc87427.c
pcf8591.c
powr1220.c
pwm-fan.c hwmon: (pwm-fan) Use HWMON_CHANNEL_INFO macro 2022-12-12 09:58:17 -06:00
raspberrypi-hwmon.c
s3c-hwmon.c
sbtsi_temp.c
sch56xx-common.c hwmon: (sch56xx-common) Simplify sch56xx_device_add 2021-06-17 04:21:44 -07:00
sch56xx-common.h hwmon: (sch56xx) Use devres functions for watchdog 2021-06-17 04:21:44 -07:00
sch5627.c hwmon: (sch56xx) Use devres functions for watchdog 2021-06-17 04:21:44 -07:00
sch5636.c hwmon: (sch56xx) Use devres functions for watchdog 2021-06-17 04:21:44 -07:00
scmi-hwmon.c
scpi-hwmon.c hwmon: (scpi-hwmon) shows the negative temperature properly 2021-06-09 11:51:30 -07:00
sht3x.c
sht4x.c hwmon: (sht4x) Fix sht4x_read_values return value 2021-06-17 04:21:45 -07:00
sht15.c
sht21.c
shtc1.c
sis5595.c
sl28cpld-hwmon.c
smm665.c
smsc47b397.c
smsc47m1.c
smsc47m192.c
sparx5-temp.c
stts751.c
tc74.c
tc654.c
thmc50.c
tmp102.c
tmp103.c
tmp108.c
tmp401.c
tmp421.c
tmp513.c
tps23861.c hwmon: (tps23861) correct shunt LSB values 2021-06-10 08:40:09 -07:00
ultra45_env.c
vexpress-hwmon.c
via-cputemp.c
via686a.c
vt1211.c
vt8231.c
w83l785ts.c
w83l786ng.c
w83627ehf.c
w83627hf.c
w83773g.c
w83781d.c
w83791d.c
w83792d.c
w83793.c
w83795.c
wm831x-hwmon.c
wm8350-hwmon.c
xgene-hwmon.c mailbox: pcc: Use PCC mailbox channel pointer instead of standard 2022-05-05 14:57:11 -04:00