diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-25 03:53:42 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-25 03:53:42 -0300 |
commit | 03dd4cb26d967f9588437b0fc9cc0e8353322bb7 (patch) | |
tree | fa581f6dc1c0596391690d1f67eceef3af8246dc /drivers/staging/android/timed_gpio.c | |
parent | d4e493caf788ef44982e131ff9c786546904d934 (diff) |
Linux-libre 4.5-gnu
Diffstat (limited to 'drivers/staging/android/timed_gpio.c')
-rw-r--r-- | drivers/staging/android/timed_gpio.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c index ce11726f1..bcd9924d4 100644 --- a/drivers/staging/android/timed_gpio.c +++ b/drivers/staging/android/timed_gpio.c @@ -25,7 +25,6 @@ #include "timed_output.h" #include "timed_gpio.h" - struct timed_gpio_data { struct timed_output_dev dev; struct hrtimer timer; @@ -76,8 +75,8 @@ static void gpio_enable(struct timed_output_dev *dev, int value) value = data->max_timeout; hrtimer_start(&data->timer, - ktime_set(value / 1000, (value % 1000) * 1000000), - HRTIMER_MODE_REL); + ktime_set(value / 1000, (value % 1000) * 1000000), + HRTIMER_MODE_REL); } spin_unlock_irqrestore(&data->lock, flags); @@ -94,8 +93,8 @@ static int timed_gpio_probe(struct platform_device *pdev) return -EBUSY; gpio_data = devm_kzalloc(&pdev->dev, - sizeof(struct timed_gpio_data) * pdata->num_gpios, - GFP_KERNEL); + sizeof(*gpio_data) * pdata->num_gpios, + GFP_KERNEL); if (!gpio_data) return -ENOMEM; @@ -104,7 +103,7 @@ static int timed_gpio_probe(struct platform_device *pdev) gpio_dat = &gpio_data[i]; hrtimer_init(&gpio_dat->timer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); + HRTIMER_MODE_REL); gpio_dat->timer.function = gpio_timer_func; spin_lock_init(&gpio_dat->lock); |