Commit e279ee89 authored by Alison Schofield's avatar Alison Schofield Committed by Greg Kroah-Hartman

staging: iio: io-trig-bfin-timer: use dev_get_platdata()

Use dev_get_platdata() for retrieving the platform data instead of
accessing dev->platform_data directly. Move the assignment out of
the declaration (avoid lines over 80 char and put it close to
usage).
Signed-off-by: default avatarAlison Schofield <amsfield22@gmail.com>
Acked-by: default avatarDaniel Baluta <daniel.baluta@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7b58e240
...@@ -178,7 +178,7 @@ static const struct iio_trigger_ops iio_bfin_tmr_trigger_ops = { ...@@ -178,7 +178,7 @@ static const struct iio_trigger_ops iio_bfin_tmr_trigger_ops = {
static int iio_bfin_tmr_trigger_probe(struct platform_device *pdev) static int iio_bfin_tmr_trigger_probe(struct platform_device *pdev)
{ {
struct iio_bfin_timer_trigger_pdata *pdata = pdev->dev.platform_data; struct iio_bfin_timer_trigger_pdata *pdata;
struct bfin_tmr_state *st; struct bfin_tmr_state *st;
unsigned int config; unsigned int config;
int ret; int ret;
...@@ -221,6 +221,7 @@ static int iio_bfin_tmr_trigger_probe(struct platform_device *pdev) ...@@ -221,6 +221,7 @@ static int iio_bfin_tmr_trigger_probe(struct platform_device *pdev)
config = PWM_OUT | PERIOD_CNT | IRQ_ENA; config = PWM_OUT | PERIOD_CNT | IRQ_ENA;
pdata = dev_get_platdata(&pdev->dev);
if (pdata && pdata->output_enable) { if (pdata && pdata->output_enable) {
unsigned long long val; unsigned long long val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment