提交 5eec14cc 编写于 作者: S Stephen Boyd 提交者: Lee Jones

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: NStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 bae911a0
......@@ -77,7 +77,7 @@ struct ssbi {
spinlock_t lock;
enum ssbi_controller_type controller_type;
int (*read)(struct ssbi *, u16 addr, u8 *buf, int len);
int (*write)(struct ssbi *, u16 addr, u8 *buf, int len);
int (*write)(struct ssbi *, u16 addr, const u8 *buf, int len);
};
#define to_ssbi(dev) platform_get_drvdata(to_platform_device(dev))
......@@ -146,7 +146,7 @@ ssbi_read_bytes(struct ssbi *ssbi, u16 addr, u8 *buf, int len)
}
static int
ssbi_write_bytes(struct ssbi *ssbi, u16 addr, u8 *buf, int len)
ssbi_write_bytes(struct ssbi *ssbi, u16 addr, const u8 *buf, int len)
{
int ret = 0;
......@@ -223,7 +223,7 @@ ssbi_pa_read_bytes(struct ssbi *ssbi, u16 addr, u8 *buf, int len)
}
static int
ssbi_pa_write_bytes(struct ssbi *ssbi, u16 addr, u8 *buf, int len)
ssbi_pa_write_bytes(struct ssbi *ssbi, u16 addr, const u8 *buf, int len)
{
u32 cmd;
int ret = 0;
......@@ -255,7 +255,7 @@ int ssbi_read(struct device *dev, u16 addr, u8 *buf, int len)
}
EXPORT_SYMBOL_GPL(ssbi_read);
int ssbi_write(struct device *dev, u16 addr, u8 *buf, int len)
int ssbi_write(struct device *dev, u16 addr, const u8 *buf, int len)
{
struct ssbi *ssbi = to_ssbi(dev);
unsigned long flags;
......
......@@ -17,7 +17,7 @@
#include <linux/types.h>
int ssbi_write(struct device *dev, u16 addr, u8 *buf, int len);
int ssbi_write(struct device *dev, u16 addr, const u8 *buf, int len);
int ssbi_read(struct device *dev, u16 addr, u8 *buf, int len);
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册