summaryrefslogtreecommitdiff
path: root/drivers/hwmon/pmbus/pxe1610.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/pmbus/pxe1610.c')
-rw-r--r--drivers/hwmon/pmbus/pxe1610.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/hwmon/pmbus/pxe1610.c b/drivers/hwmon/pmbus/pxe1610.c
index 517584cff3de..6a4a978eca7e 100644
--- a/drivers/hwmon/pmbus/pxe1610.c
+++ b/drivers/hwmon/pmbus/pxe1610.c
@@ -41,6 +41,15 @@ static int pxe1610_identify(struct i2c_client *client,
info->vrm_version[i] = vr13;
break;
default:
+ /*
+ * If prior pages are available limit operation
+ * to them
+ */
+ if (i != 0) {
+ info->pages = i;
+ return 0;
+ }
+
return -ENODEV;
}
}
@@ -78,8 +87,7 @@ static struct pmbus_driver_info pxe1610_info = {
.identify = pxe1610_identify,
};
-static int pxe1610_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int pxe1610_probe(struct i2c_client *client)
{
struct pmbus_driver_info *info;
u8 buf[I2C_SMBUS_BLOCK_MAX];
@@ -115,13 +123,13 @@ static int pxe1610_probe(struct i2c_client *client,
if (!info)
return -ENOMEM;
- return pmbus_do_probe(client, id, info);
+ return pmbus_do_probe(client, info);
}
static const struct i2c_device_id pxe1610_id[] = {
- {"pxe1610", 0},
- {"pxe1110", 0},
- {"pxm1310", 0},
+ {"pxe1610"},
+ {"pxe1110"},
+ {"pxm1310"},
{}
};
@@ -132,7 +140,6 @@ static struct i2c_driver pxe1610_driver = {
.name = "pxe1610",
},
.probe = pxe1610_probe,
- .remove = pmbus_do_remove,
.id_table = pxe1610_id,
};
@@ -141,3 +148,4 @@ module_i2c_driver(pxe1610_driver);
MODULE_AUTHOR("Vijay Khemka <vijaykhemka@fb.com>");
MODULE_DESCRIPTION("PMBus driver for Infineon PXE1610, PXE1110 and PXM1310");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("PMBUS");