int bma400_probe(struct device *dev, struct regmap *regmap, const char *name);
-int bma400_remove(struct device *dev);
+void bma400_remove(struct device *dev);
#endif
}
EXPORT_SYMBOL(bma400_probe);
-int bma400_remove(struct device *dev)
+void bma400_remove(struct device *dev)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct bma400_data *data = iio_priv(indio_dev);
ret = bma400_set_power_mode(data, POWER_MODE_SLEEP);
mutex_unlock(&data->mutex);
+ if (ret)
+ dev_warn(dev, "Failed to put device into sleep mode (%pe)\n", ERR_PTR(ret));
+
regulator_bulk_disable(ARRAY_SIZE(data->regulators),
data->regulators);
iio_device_unregister(indio_dev);
-
- return ret;
}
EXPORT_SYMBOL(bma400_remove);
static int bma400_i2c_remove(struct i2c_client *client)
{
- return bma400_remove(&client->dev);
+ bma400_remove(&client->dev);
+
+ return 0;
}
static const struct i2c_device_id bma400_i2c_ids[] = {
static int bma400_spi_remove(struct spi_device *spi)
{
- return bma400_remove(&spi->dev);
+ bma400_remove(&spi->dev);
+
+ return 0;
}
static const struct spi_device_id bma400_spi_ids[] = {