diff options
Diffstat (limited to 'kernel/drivers/staging/iio/magnetometer/hmc5843_spi.c')
-rw-r--r-- | kernel/drivers/staging/iio/magnetometer/hmc5843_spi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/drivers/staging/iio/magnetometer/hmc5843_spi.c b/kernel/drivers/staging/iio/magnetometer/hmc5843_spi.c index 8e658f736..8be198058 100644 --- a/kernel/drivers/staging/iio/magnetometer/hmc5843_spi.c +++ b/kernel/drivers/staging/iio/magnetometer/hmc5843_spi.c @@ -59,6 +59,7 @@ static const struct regmap_config hmc5843_spi_regmap_config = { static int hmc5843_spi_probe(struct spi_device *spi) { int ret; + const struct spi_device_id *id = spi_get_device_id(spi); spi->mode = SPI_MODE_3; spi->max_speed_hz = 8000000; @@ -69,7 +70,7 @@ static int hmc5843_spi_probe(struct spi_device *spi) return hmc5843_common_probe(&spi->dev, devm_regmap_init_spi(spi, &hmc5843_spi_regmap_config), - HMC5983_ID); + id->driver_data, id->name); } static int hmc5843_spi_remove(struct spi_device *spi) @@ -81,12 +82,12 @@ static const struct spi_device_id hmc5843_id[] = { { "hmc5983", HMC5983_ID }, { } }; +MODULE_DEVICE_TABLE(spi, hmc5843_id); static struct spi_driver hmc5843_driver = { .driver = { .name = "hmc5843", .pm = HMC5843_PM_OPS, - .owner = THIS_MODULE, }, .id_table = hmc5843_id, .probe = hmc5843_spi_probe, |