Skip to content

Commit

Permalink
watchdog: pika_wdt: add __ro_after_init to ident
Browse files Browse the repository at this point in the history
The object ident of type watchdog_info structure is not
modified after getting initialized by pikawdt_init. Apart from getting
referenced in init it is also passed as an argument to the function
copy_to_user but this argument is of type const void *. Therefore add
__ro_after_init to its declaration.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Bhumika Goyal authored and Guenter Roeck committed Feb 24, 2017
1 parent 8d97005 commit cb5f9d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/pika_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static struct {
struct timer_list timer; /* The timer that pings the watchdog */
} pikawdt_private;

static struct watchdog_info ident = {
static struct watchdog_info ident __ro_after_init = {
.identity = DRV_NAME,
.options = WDIOF_CARDRESET |
WDIOF_SETTIMEOUT |
Expand Down

0 comments on commit cb5f9d4

Please sign in to comment.