提交 6757c648 编写于 作者: U Uwe Kleine-König 提交者: Greg Kroah-Hartman

misc: apds990x: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221118224540.619276-485-uwe@kleine-koenig.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 244179db
...@@ -1051,8 +1051,7 @@ static const struct attribute_group apds990x_attribute_group[] = { ...@@ -1051,8 +1051,7 @@ static const struct attribute_group apds990x_attribute_group[] = {
{.attrs = sysfs_attrs_ctrl }, {.attrs = sysfs_attrs_ctrl },
}; };
static int apds990x_probe(struct i2c_client *client, static int apds990x_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
struct apds990x_chip *chip; struct apds990x_chip *chip;
int err; int err;
...@@ -1272,7 +1271,7 @@ static struct i2c_driver apds990x_driver = { ...@@ -1272,7 +1271,7 @@ static struct i2c_driver apds990x_driver = {
.name = "apds990x", .name = "apds990x",
.pm = &apds990x_pm_ops, .pm = &apds990x_pm_ops,
}, },
.probe = apds990x_probe, .probe_new = apds990x_probe,
.remove = apds990x_remove, .remove = apds990x_remove,
.id_table = apds990x_id, .id_table = apds990x_id,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册