Minor changes

This commit is contained in:
Loic Guegan 2023-08-14 17:10:40 +02:00
parent 3ed60f4537
commit 4acb4daa59

View file

@ -41,7 +41,7 @@ static ssize_t _attr##_show(struct device *dev, struct device_attribute *attr, c
err = regmap_read(cdata->regmap, (_reg), &rvalue); \
if(err>0) \
return err; \
return sprintf(buf, "%x\n", rvalue); \
return sprintf(buf, "0x%x\n", rvalue); \
}
#define INA260_REG_STORE(_attr,_reg) \
@ -57,18 +57,6 @@ static ssize_t _attr##_store(struct device *dev, struct device_attribute *attr,
return count; \
}
/**
* @brief This macro is not available on old kernel especially the one
* used by Beaglebones Single Board Computers
*/
#define HWMON_CHANNEL_INFO(stype, ...) \
(&(struct hwmon_channel_info) { \
.type = hwmon_##stype, \
.config = (u32 []) { \
__VA_ARGS__, 0 \
} \
})
/**
* @brief Embedded user data
*/