From f4a2ebc2202a58e791f7653f52263a6e3df789d6 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 23 Feb 2015 19:49:19 -0600 Subject: [PATCH] CAN driver: Oop. unlink method does not exist if there operaions on the pseudo filesystem are disabled --- drivers/can.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/can.c b/drivers/can.c index 0635767992..6eb98cc0a6 100644 --- a/drivers/can.c +++ b/drivers/can.c @@ -112,11 +112,13 @@ static const struct file_operations g_canops = can_read, /* read */ can_write, /* write */ 0, /* seek */ - can_ioctl, /* ioctl */ + can_ioctl /* ioctl */ #ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + , 0 /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , 0 /* unlink */ #endif - 0 /* unlink */ }; /****************************************************************************