[PATCH v3 4/8] iio: common: cros_ec_sensors: clean code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Drop redundant initialization previously set in cros_ec_sensors_init

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@xxxxxxxxxxxxx>
---
 drivers/iio/light/cros_ec_light_prox.c | 2 --
 drivers/iio/pressure/cros_ec_baro.c    | 2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/iio/light/cros_ec_light_prox.c b/drivers/iio/light/cros_ec_light_prox.c
index 682dc19c2bf3..73f5dcbda0d5 100644
--- a/drivers/iio/light/cros_ec_light_prox.c
+++ b/drivers/iio/light/cros_ec_light_prox.c
@@ -179,8 +179,6 @@ static int cros_ec_light_prox_probe(struct platform_device *pdev)
 
 	indio_dev = platform_get_drvdata(pdev);
 	state = iio_priv(indio_dev);
-	state->core.type = state->core.resp->info.type;
-	state->core.loc = state->core.resp->info.location;
 	state->core.info.read_raw = &cros_ec_light_prox_read;
 	state->core.info.write_raw = &cros_ec_light_prox_write;
 
diff --git a/drivers/iio/pressure/cros_ec_baro.c b/drivers/iio/pressure/cros_ec_baro.c
index 9d3745bc2fba..f8107a8b8e72 100644
--- a/drivers/iio/pressure/cros_ec_baro.c
+++ b/drivers/iio/pressure/cros_ec_baro.c
@@ -125,8 +125,6 @@ static int cros_ec_baro_probe(struct platform_device *pdev)
 
 	indio_dev = platform_get_drvdata(pdev);
 	state = iio_priv(indio_dev);
-	state->core.type = state->core.resp->info.type;
-	state->core.loc = state->core.resp->info.location;
 	state->core.info.read_raw = &cros_ec_baro_read;
 	state->core.info.write_raw = &cros_ec_baro_write;
 
-- 
2.20.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux