]> git.karo-electronics.de Git - linux-beck.git/commitdiff
pwm: tiehrpwm: inline accessor functions
authorWolfram Sang <wsa@sang-engineering.com>
Wed, 2 Apr 2014 11:56:22 +0000 (13:56 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 21 May 2014 09:51:26 +0000 (11:51 +0200)
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: Wolfram Sang <wsa@sang-engineering.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-tiehrpwm.c

index f5e371dc4e504d33ff506816c86e1a90b62341bb..cb75133085a8b9b0adaa71a3374645520a0023c6 100644 (file)
@@ -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);
 }
 
-static u16 ehrpwm_read(void __iomem *base, int offset)
+static inline u16 ehrpwm_read(void __iomem *base, int 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);
 }