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

mfd: ssbi: Constify buffer in ssbi_write

In preparation for passing a const pointer directly to
ssbi_write() from the regmap APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Stephen Boyd and committed by
Lee Jones
5eec14cc bae911a0

+5 -5
+4 -4
drivers/mfd/ssbi.c
··· 77 77 spinlock_t lock; 78 78 enum ssbi_controller_type controller_type; 79 79 int (*read)(struct ssbi *, u16 addr, u8 *buf, int len); 80 - int (*write)(struct ssbi *, u16 addr, u8 *buf, int len); 80 + int (*write)(struct ssbi *, u16 addr, const u8 *buf, int len); 81 81 }; 82 82 83 83 #define to_ssbi(dev) platform_get_drvdata(to_platform_device(dev)) ··· 146 146 } 147 147 148 148 static int 149 - ssbi_write_bytes(struct ssbi *ssbi, u16 addr, u8 *buf, int len) 149 + ssbi_write_bytes(struct ssbi *ssbi, u16 addr, const u8 *buf, int len) 150 150 { 151 151 int ret = 0; 152 152 ··· 223 223 } 224 224 225 225 static int 226 - ssbi_pa_write_bytes(struct ssbi *ssbi, u16 addr, u8 *buf, int len) 226 + ssbi_pa_write_bytes(struct ssbi *ssbi, u16 addr, const u8 *buf, int len) 227 227 { 228 228 u32 cmd; 229 229 int ret = 0; ··· 255 255 } 256 256 EXPORT_SYMBOL_GPL(ssbi_read); 257 257 258 - int ssbi_write(struct device *dev, u16 addr, u8 *buf, int len) 258 + int ssbi_write(struct device *dev, u16 addr, const u8 *buf, int len) 259 259 { 260 260 struct ssbi *ssbi = to_ssbi(dev); 261 261 unsigned long flags;
+1 -1
include/linux/ssbi.h
··· 17 17 18 18 #include <linux/types.h> 19 19 20 - int ssbi_write(struct device *dev, u16 addr, u8 *buf, int len); 20 + int ssbi_write(struct device *dev, u16 addr, const u8 *buf, int len); 21 21 int ssbi_read(struct device *dev, u16 addr, u8 *buf, int len); 22 22 23 23 #endif