projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af5d716
)
iio: adc: rcar-gyroadc: Use of_device_get_match_data() helper
author
Geert Uytterhoeven
<
[email protected]
>
Wed, 4 Oct 2017 12:08:26 +0000
(14:08 +0200)
committer
Jonathan Cameron
<
[email protected]
>
Mon, 9 Oct 2017 19:50:49 +0000
(20:50 +0100)
Use the of_device_get_match_data() helper instead of open coding.
Note that the rcar-gyroadc driver is used with DT only, so there's
always a valid match.
Signed-off-by: Geert Uytterhoeven <
[email protected]
>
Reviewed-by: Simon Horman <
[email protected]
>
Signed-off-by: Jonathan Cameron <
[email protected]
>
drivers/iio/adc/rcar-gyroadc.c
patch
|
blob
|
history
diff --git
a/drivers/iio/adc/rcar-gyroadc.c
b/drivers/iio/adc/rcar-gyroadc.c
index 0098c66a195724003d7dfa3bac390b9227590435..dcb50172186f49ab62722997cc34a55bdb667a06 100644
(file)
--- a/
drivers/iio/adc/rcar-gyroadc.c
+++ b/
drivers/iio/adc/rcar-gyroadc.c
@@
-487,8
+487,6
@@
err:
static int rcar_gyroadc_probe(struct platform_device *pdev)
{
- const struct of_device_id *of_id =
- of_match_device(rcar_gyroadc_match, &pdev->dev);
struct device *dev = &pdev->dev;
struct rcar_gyroadc *priv;
struct iio_dev *indio_dev;
@@
-525,7
+523,8
@@
static int rcar_gyroadc_probe(struct platform_device *pdev)
if (ret)
return ret;
- priv->model = (enum rcar_gyroadc_model)of_id->data;
+ priv->model = (enum rcar_gyroadc_model)
+ of_device_get_match_data(&pdev->dev);
platform_set_drvdata(pdev, indio_dev);