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

hpet: remove unused writeq/readq function definitions

On all arch using hpet, only i386 miss writeq/readq.
Instead of rewriting them, use linux/io-64-nonatomic-lo-hi.h which
already have them.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Link: https://lore.kernel.org/r/20220125140352.4085290-1-clabbe@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Corentin Labbe and committed by
Greg Kroah-Hartman
b86f3295 7163ae16

+1 -16
+1 -16
drivers/char/hpet.c
··· 16 16 #include <linux/ioport.h> 17 17 #include <linux/fcntl.h> 18 18 #include <linux/init.h> 19 + #include <linux/io-64-nonatomic-lo-hi.h> 19 20 #include <linux/poll.h> 20 21 #include <linux/mm.h> 21 22 #include <linux/proc_fs.h> ··· 120 119 #define HPET_IE 0x0002 /* interrupt enabled */ 121 120 #define HPET_PERIODIC 0x0004 122 121 #define HPET_SHARED_IRQ 0x0008 123 - 124 - 125 - #ifndef readq 126 - static inline unsigned long long readq(void __iomem *addr) 127 - { 128 - return readl(addr) | (((unsigned long long)readl(addr + 4)) << 32LL); 129 - } 130 - #endif 131 - 132 - #ifndef writeq 133 - static inline void writeq(unsigned long long v, void __iomem *addr) 134 - { 135 - writel(v & 0xffffffff, addr); 136 - writel(v >> 32, addr + 4); 137 - } 138 - #endif 139 122 140 123 static irqreturn_t hpet_interrupt(int irq, void *data) 141 124 {