aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/temperature
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/temperature')
-rw-r--r--drivers/iio/temperature/ltc2983.c13
-rw-r--r--drivers/iio/temperature/max31865.c2
-rw-r--r--drivers/iio/temperature/maxim_thermocouple.c2
3 files changed, 9 insertions, 8 deletions
diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c
index 4fc654275155..b652d2b39bcf 100644
--- a/drivers/iio/temperature/ltc2983.c
+++ b/drivers/iio/temperature/ltc2983.c
@@ -204,11 +204,11 @@ struct ltc2983_data {
u8 num_channels;
u8 iio_channels;
/*
- * DMA (thus cache coherency maintenance) requires the
+ * DMA (thus cache coherency maintenance) may require the
* transfer buffers to live in their own cache lines.
* Holds the converted temperature
*/
- __be32 temp ____cacheline_aligned;
+ __be32 temp __aligned(IIO_DMA_MINALIGN);
};
struct ltc2983_sensor {
@@ -1534,7 +1534,7 @@ static int ltc2983_probe(struct spi_device *spi)
return devm_iio_device_register(&spi->dev, indio_dev);
}
-static int __maybe_unused ltc2983_resume(struct device *dev)
+static int ltc2983_resume(struct device *dev)
{
struct ltc2983_data *st = spi_get_drvdata(to_spi_device(dev));
int dummy;
@@ -1545,14 +1545,15 @@ static int __maybe_unused ltc2983_resume(struct device *dev)
return ltc2983_setup(st, false);
}
-static int __maybe_unused ltc2983_suspend(struct device *dev)
+static int ltc2983_suspend(struct device *dev)
{
struct ltc2983_data *st = spi_get_drvdata(to_spi_device(dev));
return regmap_write(st->regmap, LTC2983_STATUS_REG, LTC2983_SLEEP);
}
-static SIMPLE_DEV_PM_OPS(ltc2983_pm_ops, ltc2983_suspend, ltc2983_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(ltc2983_pm_ops, ltc2983_suspend,
+ ltc2983_resume);
static const struct spi_device_id ltc2983_id_table[] = {
{ "ltc2983" },
@@ -1570,7 +1571,7 @@ static struct spi_driver ltc2983_driver = {
.driver = {
.name = "ltc2983",
.of_match_table = ltc2983_of_match,
- .pm = &ltc2983_pm_ops,
+ .pm = pm_sleep_ptr(&ltc2983_pm_ops),
},
.probe = ltc2983_probe,
.id_table = ltc2983_id_table,
diff --git a/drivers/iio/temperature/max31865.c b/drivers/iio/temperature/max31865.c
index e3bb78184c6e..29e23652ba5a 100644
--- a/drivers/iio/temperature/max31865.c
+++ b/drivers/iio/temperature/max31865.c
@@ -55,7 +55,7 @@ struct max31865_data {
struct mutex lock;
bool filter_50hz;
bool three_wire;
- u8 buf[2] ____cacheline_aligned;
+ u8 buf[2] __aligned(IIO_DMA_MINALIGN);
};
static int max31865_read(struct max31865_data *data, u8 reg,
diff --git a/drivers/iio/temperature/maxim_thermocouple.c b/drivers/iio/temperature/maxim_thermocouple.c
index 98c41cddc6f0..c28a7a6dea5f 100644
--- a/drivers/iio/temperature/maxim_thermocouple.c
+++ b/drivers/iio/temperature/maxim_thermocouple.c
@@ -122,7 +122,7 @@ struct maxim_thermocouple_data {
struct spi_device *spi;
const struct maxim_thermocouple_chip *chip;
- u8 buffer[16] ____cacheline_aligned;
+ u8 buffer[16] __aligned(IIO_DMA_MINALIGN);
char tc_type;
};