Skip to content

Commit 87ab726

Browse files
Uwe Kleine-Königwsakernel
authored andcommitted
i2c: slave-eeprom: Convert to i2c's .probe_new()
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent a5eacd2 commit 87ab726

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/i2c/i2c-slave-eeprom.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ static int i2c_slave_init_eeprom_data(struct eeprom_data *eeprom, struct i2c_cli
140140
return 0;
141141
}
142142

143-
static int i2c_slave_eeprom_probe(struct i2c_client *client, const struct i2c_device_id *id)
143+
static int i2c_slave_eeprom_probe(struct i2c_client *client)
144144
{
145+
const struct i2c_device_id *id = i2c_client_get_device_id(client);
145146
struct eeprom_data *eeprom;
146147
int ret;
147148
unsigned int size = FIELD_GET(I2C_SLAVE_BYTELEN, id->driver_data) + 1;
@@ -206,7 +207,7 @@ static struct i2c_driver i2c_slave_eeprom_driver = {
206207
.driver = {
207208
.name = "i2c-slave-eeprom",
208209
},
209-
.probe = i2c_slave_eeprom_probe,
210+
.probe_new = i2c_slave_eeprom_probe,
210211
.remove = i2c_slave_eeprom_remove,
211212
.id_table = i2c_slave_eeprom_id,
212213
};

0 commit comments

Comments
 (0)