Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cec4850 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Jonathan Cameron
Browse files

iio: imu: st_lsm6dsx: substitute ifdef CONFIG_PM with __maybe_unused macro



Get rid of #ifdef CONFIG_PM by adding __maybe_unused macro to
st_lsm6dsx_suspend and st_lsm6dsx_resume function declarations

Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 5333e886
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -732,8 +732,7 @@ int st_lsm6dsx_probe(struct device *dev, int irq, int hw_id, const char *name,
}
}
EXPORT_SYMBOL(st_lsm6dsx_probe);
EXPORT_SYMBOL(st_lsm6dsx_probe);


#ifdef CONFIG_PM
static int __maybe_unused st_lsm6dsx_suspend(struct device *dev)
static int st_lsm6dsx_suspend(struct device *dev)
{
{
	struct st_lsm6dsx_hw *hw = dev_get_drvdata(dev);
	struct st_lsm6dsx_hw *hw = dev_get_drvdata(dev);
	struct st_lsm6dsx_sensor *sensor;
	struct st_lsm6dsx_sensor *sensor;
@@ -757,7 +756,7 @@ static int st_lsm6dsx_suspend(struct device *dev)
	return err;
	return err;
}
}


static int st_lsm6dsx_resume(struct device *dev)
static int __maybe_unused st_lsm6dsx_resume(struct device *dev)
{
{
	struct st_lsm6dsx_hw *hw = dev_get_drvdata(dev);
	struct st_lsm6dsx_hw *hw = dev_get_drvdata(dev);
	struct st_lsm6dsx_sensor *sensor;
	struct st_lsm6dsx_sensor *sensor;
@@ -778,7 +777,6 @@ static int st_lsm6dsx_resume(struct device *dev)


	return err;
	return err;
}
}
#endif /* CONFIG_PM */


const struct dev_pm_ops st_lsm6dsx_pm_ops = {
const struct dev_pm_ops st_lsm6dsx_pm_ops = {
	SET_SYSTEM_SLEEP_PM_OPS(st_lsm6dsx_suspend, st_lsm6dsx_resume)
	SET_SYSTEM_SLEEP_PM_OPS(st_lsm6dsx_suspend, st_lsm6dsx_resume)