Skip to content

Commit 54091b5

Browse files
lokeshvutlathierryreding
authored andcommitted
pwm: omap-dmtimer: Drop unused header file
pwm_omap_dmtimer.h is used only: - to typedef struct omap_dm_timer to pwm_omap_dmtimer - for macro PWM_OMAP_DMTIMER_TRIGGER_OVERFLOW_AND_COMPARE Rest of the file is pretty mush unsed. So reuse omap_dm_timer and OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE in pwm-omap-dmtimer.c and delete the header file. Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent a1098c1 commit 54091b5

File tree

3 files changed

+10
-103
lines changed

3 files changed

+10
-103
lines changed

drivers/pwm/pwm-omap-dmtimer.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include <linux/mutex.h>
2121
#include <linux/of.h>
2222
#include <linux/of_platform.h>
23+
#include <clocksource/timer-ti-dm.h>
2324
#include <linux/platform_data/dmtimer-omap.h>
24-
#include <linux/platform_data/pwm_omap_dmtimer.h>
2525
#include <linux/platform_device.h>
2626
#include <linux/pm_runtime.h>
2727
#include <linux/pwm.h>
@@ -34,7 +34,7 @@
3434
struct pwm_omap_dmtimer_chip {
3535
struct pwm_chip chip;
3636
struct mutex mutex;
37-
pwm_omap_dmtimer *dm_timer;
37+
struct omap_dm_timer *dm_timer;
3838
const struct omap_dm_timer_ops *pdata;
3939
struct platform_device *dm_timer_pdev;
4040
};
@@ -190,10 +190,9 @@ static int pwm_omap_dmtimer_config(struct pwm_chip *chip,
190190
load_value, load_value, match_value, match_value);
191191

192192
omap->pdata->set_pwm(omap->dm_timer,
193-
pwm_get_polarity(pwm) == PWM_POLARITY_INVERSED,
194-
true,
195-
PWM_OMAP_DMTIMER_TRIGGER_OVERFLOW_AND_COMPARE,
196-
true);
193+
pwm_get_polarity(pwm) == PWM_POLARITY_INVERSED,
194+
true, OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE,
195+
true);
197196

198197
/* If config was called while timer was running it must be reenabled. */
199198
if (timer_active)
@@ -221,10 +220,9 @@ static int pwm_omap_dmtimer_set_polarity(struct pwm_chip *chip,
221220
*/
222221
mutex_lock(&omap->mutex);
223222
omap->pdata->set_pwm(omap->dm_timer,
224-
polarity == PWM_POLARITY_INVERSED,
225-
true,
226-
PWM_OMAP_DMTIMER_TRIGGER_OVERFLOW_AND_COMPARE,
227-
true);
223+
polarity == PWM_POLARITY_INVERSED,
224+
true, OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE,
225+
true);
228226
mutex_unlock(&omap->mutex);
229227

230228
return 0;
@@ -246,7 +244,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
246244
struct pwm_omap_dmtimer_chip *omap;
247245
struct dmtimer_platform_data *timer_pdata;
248246
const struct omap_dm_timer_ops *pdata;
249-
pwm_omap_dmtimer *dm_timer;
247+
struct omap_dm_timer *dm_timer;
250248
u32 v;
251249
int ret = 0;
252250

include/clocksource/timer-ti-dm.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@ int omap_dm_timers_active(void);
248248

249249
/*
250250
* The below are inlined to optimize code size for system timers. Other code
251-
* should not need these at all, see
252-
* include/linux/platform_data/pwm_omap_dmtimer.h
251+
* should not need these at all.
253252
*/
254253
#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
255254
static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg,

include/linux/platform_data/pwm_omap_dmtimer.h

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)