Skip to content

Commit

Permalink
macintosh: Drop explicit initialization of struct i2c_device_id::driv…
Browse files Browse the repository at this point in the history
…er_data to 0

These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240624132433.1244750-2-u.kleine-koenig@baylibre.com
  • Loading branch information
Uwe Kleine-König authored and Michael Ellerman committed Jun 28, 2024
1 parent f431a8c commit 38767dd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/macintosh/ams/ams-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static int ams_i2c_probe(struct i2c_client *client);
static void ams_i2c_remove(struct i2c_client *client);

static const struct i2c_device_id ams_id[] = {
{ "MAC,accelerometer_1", 0 },
{ "MAC,accelerometer_1" },
{ }
};
MODULE_DEVICE_TABLE(i2c, ams_id);
Expand Down
2 changes: 1 addition & 1 deletion drivers/macintosh/windfarm_ad7417_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static void wf_ad7417_remove(struct i2c_client *client)
}

static const struct i2c_device_id wf_ad7417_id[] = {
{ "MAC,ad7417", 0 },
{ "MAC,ad7417" },
{ }
};
MODULE_DEVICE_TABLE(i2c, wf_ad7417_id);
Expand Down
2 changes: 1 addition & 1 deletion drivers/macintosh/windfarm_fcu_controls.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ static void wf_fcu_remove(struct i2c_client *client)
}

static const struct i2c_device_id wf_fcu_id[] = {
{ "MAC,fcu", 0 },
{ "MAC,fcu" },
{ }
};
MODULE_DEVICE_TABLE(i2c, wf_fcu_id);
Expand Down
2 changes: 1 addition & 1 deletion drivers/macintosh/windfarm_lm87_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static void wf_lm87_remove(struct i2c_client *client)
}

static const struct i2c_device_id wf_lm87_id[] = {
{ "MAC,lm87cimt", 0 },
{ "MAC,lm87cimt" },
{ }
};
MODULE_DEVICE_TABLE(i2c, wf_lm87_id);
Expand Down
2 changes: 1 addition & 1 deletion drivers/macintosh/windfarm_max6690_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static void wf_max6690_remove(struct i2c_client *client)
}

static const struct i2c_device_id wf_max6690_id[] = {
{ "MAC,max6690", 0 },
{ "MAC,max6690" },
{ }
};
MODULE_DEVICE_TABLE(i2c, wf_max6690_id);
Expand Down
2 changes: 1 addition & 1 deletion drivers/macintosh/windfarm_smu_sat.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ static void wf_sat_remove(struct i2c_client *client)
}

static const struct i2c_device_id wf_sat_id[] = {
{ "MAC,smu-sat", 0 },
{ "MAC,smu-sat" },
{ }
};
MODULE_DEVICE_TABLE(i2c, wf_sat_id);
Expand Down

0 comments on commit 38767dd

Please sign in to comment.