Skip to content

Commit

Permalink
pcmcia: make pccard_cis_attr const
Browse files Browse the repository at this point in the history
Make this const as it is only passed to the const arguments of the
functions sysfs_remove_bin_file and sysfs_create_bin_file. Make the
declaration const too.

Structure found using Coccinelle and changes done by hand.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Bhumika Goyal authored and Greg Kroah-Hartman committed Oct 4, 2017
1 parent 846df24 commit c151206
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/pcmcia/cistpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ static ssize_t pccard_store_cis(struct file *filp, struct kobject *kobj,
}


struct bin_attribute pccard_cis_attr = {
const struct bin_attribute pccard_cis_attr = {
.attr = { .name = "cis", .mode = S_IRUGO | S_IWUSR },
.size = 0x200,
.read = pccard_show_cis,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pcmcia/cs_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void pcmcia_cleanup_irq(struct pcmcia_socket *s);
int pcmcia_setup_irq(struct pcmcia_device *p_dev);

/* cistpl.c */
extern struct bin_attribute pccard_cis_attr;
extern const struct bin_attribute pccard_cis_attr;

int pcmcia_read_cis_mem(struct pcmcia_socket *s, int attr,
u_int addr, u_int len, void *ptr);
Expand Down

0 comments on commit c151206

Please sign in to comment.