Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
On Wed, Apr 2, 2025, at 07:58, Akshay Gupta wrote:
+I just one more problems with this bit. This was already in the
+int create_hwmon_sensor_device(struct device *dev, struct sbrmi_data *data)
+{
+ if (IS_REACHABLE(CONFIG_HWMON)) {
+ struct device *hwmon_dev;
+
+ hwmon_dev = devm_hwmon_device_register_with_info(dev, "sbrmi", data,
+ &sbrmi_chip_info, NULL);
+ return PTR_ERR_OR_ZERO(hwmon_dev);
+ }
+ return 0;
existing code, but should still be addressed:
Using IS_REACHABLE() is usually a sign that the Kconfig dependencies
are wrong. Fix the dependencies instead so the hwmon driver can
only be enabled if the subsystem is enabled. You can either add a
separate Kconfig symbol or make the driver 'depends on HWMON || !HWMON'
to express this.
Arnd