Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Alison Schofield <amsfield22@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alison Schofield and committed by
Greg Kroah-Hartman
e279ee89 7b58e240

+2 -1
+2 -1
drivers/staging/iio/trigger/iio-trig-bfin-timer.c
··· 178 178 179 179 static int iio_bfin_tmr_trigger_probe(struct platform_device *pdev) 180 180 { 181 - struct iio_bfin_timer_trigger_pdata *pdata = pdev->dev.platform_data; 181 + struct iio_bfin_timer_trigger_pdata *pdata; 182 182 struct bfin_tmr_state *st; 183 183 unsigned int config; 184 184 int ret; ··· 221 221 222 222 config = PWM_OUT | PERIOD_CNT | IRQ_ENA; 223 223 224 + pdata = dev_get_platdata(&pdev->dev); 224 225 if (pdata && pdata->output_enable) { 225 226 unsigned long long val; 226 227