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

Commit 5f045af0 authored by Paolo Cretaro's avatar Paolo Cretaro Committed by Jonathan Cameron
Browse files

iio: cros_ec: Remove unused variables



Fix gcc warnings about variable 'ec_device' being set but not used
in these files:
common/cros_ec_sensors/cros_ec_sensors.c:194:25
light/cros_ec_light_prox.c:184:25

Signed-off-by: default avatarPaolo Cretaro <paolocretaro@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 10c7a314
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -191,7 +191,6 @@ static int cros_ec_sensors_probe(struct platform_device *pdev)
{
{
	struct device *dev = &pdev->dev;
	struct device *dev = &pdev->dev;
	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
	struct cros_ec_device *ec_device;
	struct iio_dev *indio_dev;
	struct iio_dev *indio_dev;
	struct cros_ec_sensors_state *state;
	struct cros_ec_sensors_state *state;
	struct iio_chan_spec *channel;
	struct iio_chan_spec *channel;
@@ -201,7 +200,6 @@ static int cros_ec_sensors_probe(struct platform_device *pdev)
		dev_warn(&pdev->dev, "No CROS EC device found.\n");
		dev_warn(&pdev->dev, "No CROS EC device found.\n");
		return -EINVAL;
		return -EINVAL;
	}
	}
	ec_device = ec_dev->ec_dev;


	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*state));
	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*state));
	if (!indio_dev)
	if (!indio_dev)
+0 −2
Original line number Original line Diff line number Diff line
@@ -181,7 +181,6 @@ static int cros_ec_light_prox_probe(struct platform_device *pdev)
{
{
	struct device *dev = &pdev->dev;
	struct device *dev = &pdev->dev;
	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
	struct cros_ec_device *ec_device;
	struct iio_dev *indio_dev;
	struct iio_dev *indio_dev;
	struct cros_ec_light_prox_state *state;
	struct cros_ec_light_prox_state *state;
	struct iio_chan_spec *channel;
	struct iio_chan_spec *channel;
@@ -191,7 +190,6 @@ static int cros_ec_light_prox_probe(struct platform_device *pdev)
		dev_warn(dev, "No CROS EC device found.\n");
		dev_warn(dev, "No CROS EC device found.\n");
		return -EINVAL;
		return -EINVAL;
	}
	}
	ec_device = ec_dev->ec_dev;


	indio_dev = devm_iio_device_alloc(dev, sizeof(*state));
	indio_dev = devm_iio_device_alloc(dev, sizeof(*state));
	if (!indio_dev)
	if (!indio_dev)