]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/staging/iio/magnetometer/hmc5843_spi.c
Merge remote-tracking branch 'staging/staging-next'
[karo-tx-linux.git] / drivers / staging / iio / magnetometer / hmc5843_spi.c
index 8e658f736e1f6278d33eb13ec3ae256e1ad2c1d7..8be198058ea20452cd3623d6e3564c58537b8d15 100644 (file)
@@ -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,