Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.
For instances using of_node_cmp, this has the side effect of now using
case sensitive comparisons. This should not matter for any FDT based
system which all of these are.
Cc: Liam Girdwood <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Support Opensource <[email protected]>
Cc: Sangbeom Kim <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Bartlomiej Zolnierkiewicz <[email protected]>
Cc: [email protected]
Signed-off-by: Rob Herring <[email protected]>
Acked-by: Adam Thomson <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.
Signed-off-by: Rob Herring <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Replace GPL v2.0 and v2.0+ license statements with SPDX license
identifiers.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The current code generates a static cehcker warnings because "rid < 0"
is always false:
drivers/regulator/max8997-regulator.c:169 max8997_list_voltage()
warn: condition is always false
The problem is that because of type promotion, if "rid" is negative the
comparison against ARRAY_SIZE() is type promoted to size_t and it's
treated as a very high positive value. I've changed the order of the
checks so now everyone is happy.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
When min charger-CV is <= 4.0V and max charger-CV is >= 4.0V,
we can use 4.00V as CV (register value = 0x1).`
The original code had a typo that wrote ">=" (max_uV >= 4000000),
which should've been "<", which is not necessary anyway
as mentioned by Dan Carpenter.
Reported-By: Dan Carpenter <[email protected]>
Signed-off-by: MyungJoo Ham <[email protected]>
Reviewed-by: Bartlomiej Zolnierkiewicz <[email protected]>
Reviewed-by: Chanwoo Choi <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Most Maxim PMIC regulator drivers are for sub-devices of Multi-Function
Devices with drivers under drivers/mfd. But for many of these, the same
object file name was used for both the MFD and the regulator drivers.
Having 2 different drivers with the same name causes a lot of confusion
to Kbuild, specially if these are built as module since only one module
will be installed and also exported symbols will be undefined due being
overwritten by the other module during modpost.
For example, it fixes the following issue when both drivers are module:
$ make M=drivers/regulator/
...
CC [M] drivers/regulator//max14577.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "maxim_charger_calc_reg_current" [drivers/regulator//max14577.ko] undefined!
WARNING: "maxim_charger_currents" [drivers/regulator//max14577.ko] undefined!
Reported-by: Chanwoo Choi <[email protected]>
Signed-off-by: Javier Martinez Canillas <[email protected]>
Reviewed-by: Chanwoo Choi <[email protected]>
Signed-off-by: Mark Brown <[email protected]>