diff options
Diffstat (limited to 'drivers/hwmon/pmbus/mp2856.c')
| -rw-r--r-- | drivers/hwmon/pmbus/mp2856.c | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/drivers/hwmon/pmbus/mp2856.c b/drivers/hwmon/pmbus/mp2856.c index 6969350f5d7d..41bb86667091 100644 --- a/drivers/hwmon/pmbus/mp2856.c +++ b/drivers/hwmon/pmbus/mp2856.c @@ -46,7 +46,7 @@  #define MP2856_PAGE_NUM			2 -enum chips { mp2856 = 1, mp2857 }; +enum chips { mp2856, mp2857 };  static const int mp2856_max_phases[][MP2856_PAGE_NUM] = {  	[mp2856] = { MP2856_MAX_PHASE_RAIL1, MP2856_MAX_PHASE_RAIL2 }, @@ -66,7 +66,6 @@ struct mp2856_data {  	int vout_format[MP2856_PAGE_NUM];  	int curr_sense_gain[MP2856_PAGE_NUM];  	int max_phases[MP2856_PAGE_NUM]; -	enum chips chip_id;  };  #define to_mp2856_data(x)	container_of(x, struct mp2856_data, info) @@ -397,6 +396,7 @@ static int mp2856_probe(struct i2c_client *client)  {  	struct pmbus_driver_info *info;  	struct mp2856_data *data; +	enum chips chip_id;  	int ret;  	data = devm_kzalloc(&client->dev, sizeof(struct mp2856_data), @@ -404,9 +404,9 @@ static int mp2856_probe(struct i2c_client *client)  	if (!data)  		return -ENOMEM; -	data->chip_id = (enum chips)(uintptr_t)i2c_get_match_data(client); +	chip_id = (kernel_ulong_t)i2c_get_match_data(client); -	memcpy(data->max_phases, mp2856_max_phases[data->chip_id], +	memcpy(data->max_phases, mp2856_max_phases[chip_id],  	       sizeof(data->max_phases));  	memcpy(&data->info, &mp2856_info, sizeof(*info)); |