[PATCH 02/14] USB: serial: safe_serial: fix assignment of bool to non 0/1 constant
From: Mathieu OTHACEHE
Date: Sat Jan 30 2016 - 12:48:02 EST
This patch fixes the following coccinelle error:
drivers/usb/serial/safe_serial.c:85:12-18: ERROR: Assignment of bool to non-0/1 constant
Signed-off-by: Mathieu OTHACEHE <m.othacehe@xxxxxxxxx>
---
drivers/usb/serial/safe_serial.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index 5662df6..93c6c9b 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -76,13 +76,8 @@
#include <linux/usb.h>
#include <linux/usb/serial.h>
-
-#ifndef CONFIG_USB_SERIAL_SAFE_PADDED
-#define CONFIG_USB_SERIAL_SAFE_PADDED 0
-#endif
-
static bool safe = true;
-static bool padded = CONFIG_USB_SERIAL_SAFE_PADDED;
+static bool padded = IS_ENABLED(CONFIG_USB_SERIAL_SAFE_PADDED);
#define DRIVER_AUTHOR "sl@xxxxxxxxx, tbr@xxxxxxxxx, Johan Hovold <jhovold@xxxxxxxxx>"
#define DRIVER_DESC "USB Safe Encapsulated Serial"
--
2.6.4