]> xenbits.xensource.com Git - xen.git/commitdiff
ns16550: specify uart param for ns_{read,write}_reg as const
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Fri, 20 Aug 2021 10:29:05 +0000 (12:29 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 20 Aug 2021 10:29:05 +0000 (12:29 +0200)
They don't modify it, after all.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/char/ns16550.c

index 97b85b0225ccf013f7f05537f28d38699c99df92..20da8fd3b4210cf1b28a787cbe9e06ce8dac1068 100644 (file)
@@ -108,7 +108,7 @@ struct ns16550_config_param {
 
 static void ns16550_delayed_resume(void *data);
 
-static u8 ns_read_reg(struct ns16550 *uart, unsigned int reg)
+static u8 ns_read_reg(const struct ns16550 *uart, unsigned int reg)
 {
     void __iomem *addr = uart->remapped_io_base + (reg << uart->reg_shift);
 #ifdef CONFIG_HAS_IOPORTS
@@ -126,7 +126,7 @@ static u8 ns_read_reg(struct ns16550 *uart, unsigned int reg)
     }
 }
 
-static void ns_write_reg(struct ns16550 *uart, unsigned int reg, u8 c)
+static void ns_write_reg(const struct ns16550 *uart, unsigned int reg, u8 c)
 {
     void __iomem *addr = uart->remapped_io_base + (reg << uart->reg_shift);
 #ifdef CONFIG_HAS_IOPORTS