lkml.org 
[lkml]   [2022]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 109/606] iio: imu: inv_mpu6050: Convert to i2c's .probe_new()
    Date
    From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

    .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 <u.kleine-koenig@pengutronix.de>
    ---
    drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
    index 7a8d60a5afa9..70eaa408e388 100644
    --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
    +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
    @@ -95,9 +95,9 @@ static int inv_mpu_i2c_aux_setup(struct iio_dev *indio_dev)
    *
    * Returns 0 on success, a negative error code otherwise.
    */
    -static int inv_mpu_probe(struct i2c_client *client,
    - const struct i2c_device_id *id)
    +static int inv_mpu_probe(struct i2c_client *client)
    {
    + const struct i2c_device_id *id = i2c_client_get_device_id(client);
    const void *match;
    struct inv_mpu6050_state *st;
    int result;
    @@ -260,7 +260,7 @@ static const struct acpi_device_id inv_acpi_match[] = {
    MODULE_DEVICE_TABLE(acpi, inv_acpi_match);

    static struct i2c_driver inv_mpu_driver = {
    - .probe = inv_mpu_probe,
    + .probe_new = inv_mpu_probe,
    .remove = inv_mpu_remove,
    .id_table = inv_mpu_id,
    .driver = {
    --
    2.38.1
    \
     
     \ /
      Last update: 2022-11-18 23:59    [W:2.606 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site