mtd: Make devname argument to add_mtd_device const
add_mtd_device duplicates the string where necessary, so make it const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
af5f49c2ae
commit
5f11e80670
|
@ -542,7 +542,7 @@ static int of_mtd_fixup(struct device_node *root, void *ctx)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int add_mtd_device(struct mtd_info *mtd, char *devname, int device_id)
|
||||
int add_mtd_device(struct mtd_info *mtd, const char *devname, int device_id)
|
||||
{
|
||||
struct mtddev_hook *hook;
|
||||
int ret;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
struct mtddev_hook {
|
||||
struct list_head hook;
|
||||
int (*add_mtd_device)(struct mtd_info *mtd, char *devname, void **priv);
|
||||
int (*add_mtd_device)(struct mtd_info *mtd, const char *devname, void **priv);
|
||||
int (*del_mtd_device)(struct mtd_info *mtd, void **priv);
|
||||
void *priv;
|
||||
};
|
||||
|
|
|
@ -69,7 +69,7 @@ static struct file_operations mtd_ops_oob = {
|
|||
.lseek = dev_lseek_default,
|
||||
};
|
||||
|
||||
static int add_mtdoob_device(struct mtd_info *mtd, char *devname, void **priv)
|
||||
static int add_mtdoob_device(struct mtd_info *mtd, const char *devname, void **priv)
|
||||
{
|
||||
struct mtdoob *mtdoob;
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ static const struct file_operations mtd_raw_fops = {
|
|||
.lseek = dev_lseek_default,
|
||||
};
|
||||
|
||||
static int add_mtdraw_device(struct mtd_info *mtd, char *devname, void **priv)
|
||||
static int add_mtdraw_device(struct mtd_info *mtd, const char *devname, void **priv)
|
||||
{
|
||||
struct mtdraw *mtdraw;
|
||||
|
||||
|
|
|
@ -270,7 +270,7 @@ static inline uint32_t mtd_div_by_wb(uint64_t sz, struct mtd_info *mtd)
|
|||
|
||||
/* Kernel-side ioctl definitions */
|
||||
|
||||
extern int add_mtd_device(struct mtd_info *mtd, char *devname, int device_id);
|
||||
extern int add_mtd_device(struct mtd_info *mtd, const char *devname, int device_id);
|
||||
extern int del_mtd_device (struct mtd_info *mtd);
|
||||
|
||||
extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num);
|
||||
|
|
Loading…
Reference in New Issue