mirror of
https://gitlab.com/manzerbredes/ina260-sysfs-driver.git
synced 2025-04-19 04:09:45 +00:00
Minor changes
This commit is contained in:
parent
3ed60f4537
commit
4acb4daa59
1 changed files with 9 additions and 21 deletions
14
ina260.c
14
ina260.c
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue