Commit 3ea57ea6 authored by Wolfram Sang's avatar Wolfram Sang Committed by Thierry Reding

pwm: tiehrpwm: inline accessor functions

These elementary functions should be inlined for fastest access. Also
fixes this warning as a side-effect (when no PM_SLEEP is selected):

drivers/pwm/pwm-tiehrpwm.c:141:12: warning: 'ehrpwm_read' defined but not used [-Wunused-function]
Signed-off-by: default avatarWolfram Sang <wsa@sang-engineering.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent af5935ec
...@@ -138,12 +138,12 @@ static inline struct ehrpwm_pwm_chip *to_ehrpwm_pwm_chip(struct pwm_chip *chip) ...@@ -138,12 +138,12 @@ static inline struct ehrpwm_pwm_chip *to_ehrpwm_pwm_chip(struct pwm_chip *chip)
return container_of(chip, struct ehrpwm_pwm_chip, chip); return container_of(chip, struct ehrpwm_pwm_chip, chip);
} }
static u16 ehrpwm_read(void __iomem *base, int offset) static inline u16 ehrpwm_read(void __iomem *base, int offset)
{ {
return readw(base + offset); return readw(base + offset);
} }
static void ehrpwm_write(void __iomem *base, int offset, unsigned int val) static inline void ehrpwm_write(void __iomem *base, int offset, unsigned int val)
{ {
writew(val & 0xFFFF, base + offset); writew(val & 0xFFFF, base + offset);
} }
......
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