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
2223403c81
commit
88e8a7b7f6
1 changed files with 10 additions and 8 deletions
8
ina260.c
8
ina260.c
|
@ -161,6 +161,7 @@ static struct attribute *registers_attrs[] = {
|
|||
&dev_attr_die_id.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const struct attribute_group registers_group = {
|
||||
.attrs = registers_attrs,
|
||||
.name = "registers"
|
||||
|
@ -177,9 +178,9 @@ static int ina260_probe_new(struct i2c_client *client)
|
|||
struct device *hwmon_dev;
|
||||
|
||||
// Initialize client data:
|
||||
printk(KERN_INFO "Adding ina260 [bus=%d address=0x%02x]\n",
|
||||
dev_dbg("Adding ina260 [bus=%d address=0x%02x]\n",
|
||||
client->adapter->nr, client->addr);
|
||||
p = kzalloc(sizeof(struct client_data), GFP_KERNEL);
|
||||
p = kzalloc(sizeof(client_data), GFP_KERNEL);
|
||||
p->client = client;
|
||||
p->regmap = devm_regmap_init_i2c(client, &ina260_regmap_config);
|
||||
|
||||
|
@ -196,7 +197,8 @@ static void ina260_remove(struct i2c_client *client)
|
|||
|
||||
kfree(p);
|
||||
hwmon_device_unregister(&client->dev);
|
||||
printk(KERN_INFO "Removing ina260 [bus=%d address=0x%02x]\n", client->adapter->nr, client->addr);
|
||||
dev_dbg("Removing ina260 [bus=%d address=0x%02x]\n",
|
||||
client->adapter->nr, client->addr);
|
||||
}
|
||||
|
||||
static const struct i2c_device_id ina260_ids[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue