diff --git a/drivers/input/input.c b/drivers/input/input.c
index de94ffc..8dcd393 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -316,7 +316,8 @@
 	return NULL;
 }
 
-static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap, int max)
+static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap,
+			      int max, int add_cr)
 {
 	int i;
 	int len = 0;
@@ -328,6 +329,10 @@
 	for (; i >= 0; i--)
 		len += snprintf(buf + len, max(buf_size - len, 0),
 				"%lx%s", bitmap[i], i > 0 ? " " : "");
+
+	if (add_cr)
+		len += snprintf(buf + len, max(buf_size - len, 0), "\n");
+
 	return len;
 }
 
@@ -356,8 +361,7 @@
 	do {								\
 		len += sprintf(buf + len, "B: %s=", #ev);		\
 		len += input_print_bitmap(buf + len, INT_MAX,		\
-					dev->bm##bit, ev##_MAX);	\
-		len += sprintf(buf + len, "\n");			\
+					dev->bm##bit, ev##_MAX, 1);	\
 	} while (0)
 
 #define TEST_AND_SPRINTF_BIT(ev, bm)					\
@@ -517,7 +521,8 @@
 	if (retval)								\
 		return retval;							\
 										\
-	retval = sprintf(buf, "%s\n", input_dev->name ? input_dev->name : "");	\
+	retval = scnprintf(buf, PAGE_SIZE,					\
+			   "%s\n", input_dev->name ? input_dev->name : "");	\
 										\
 	mutex_unlock(&input_dev->mutex);					\
 										\
@@ -541,7 +546,8 @@
 	return len;
 }
 
-static int print_modalias(char *buf, int size, struct input_dev *id)
+static int input_print_modalias(char *buf, int size, struct input_dev *id,
+				int add_cr)
 {
 	int len;
 
@@ -569,6 +575,10 @@
 				   0, FF_MAX);
 	len += print_modalias_bits(buf + len, size - len, 'w', id->swbit,
 				   0, SW_MAX);
+
+	if (add_cr)
+		len += snprintf(buf + len, size - len, "\n");
+
 	return len;
 }
 
@@ -577,9 +587,9 @@
 	struct input_dev *id = to_input_dev(dev);
 	ssize_t len;
 
-	len = print_modalias(buf, PAGE_SIZE, id);
-	len += snprintf(buf + len, PAGE_SIZE-len, "\n");
-	return len;
+	len = input_print_modalias(buf, PAGE_SIZE, id, 1);
+
+	return max_t(int, len, PAGE_SIZE);
 }
 static CLASS_DEVICE_ATTR(modalias, S_IRUGO, input_dev_show_modalias, NULL);
 
@@ -599,7 +609,7 @@
 static ssize_t input_dev_show_id_##name(struct class_device *dev, char *buf)	\
 {										\
 	struct input_dev *input_dev = to_input_dev(dev);			\
-	return sprintf(buf, "%04x\n", input_dev->id.name);			\
+	return scnprintf(buf, PAGE_SIZE, "%04x\n", input_dev->id.name);		\
 }										\
 static CLASS_DEVICE_ATTR(name, S_IRUGO, input_dev_show_id_##name, NULL);
 
@@ -625,7 +635,9 @@
 static ssize_t input_dev_show_cap_##bm(struct class_device *dev, char *buf)	\
 {										\
 	struct input_dev *input_dev = to_input_dev(dev);			\
-	return input_print_bitmap(buf, PAGE_SIZE, input_dev->bm##bit, ev##_MAX);\
+	int len = input_print_bitmap(buf, PAGE_SIZE,				\
+				     input_dev->bm##bit, ev##_MAX, 1);		\
+	return min_t(int, len, PAGE_SIZE);					\
 }										\
 static CLASS_DEVICE_ATTR(bm, S_IRUGO, input_dev_show_cap_##bm, NULL);
 
@@ -684,7 +696,7 @@
 
 	*cur_len += input_print_bitmap(buffer + *cur_len,
 					max(buffer_size - *cur_len, 0),
-					bitmap, max) + 1;
+					bitmap, max, 0) + 1;
 	if (*cur_len > buffer_size)
 		return -ENOMEM;
 
@@ -747,7 +759,7 @@
 
 	envp[i++] = buffer + len;
 	len += snprintf(buffer + len, buffer_size - len, "MODALIAS=");
-	len += print_modalias(buffer + len, buffer_size - len, dev) + 1;
+	len += input_print_modalias(buffer + len, buffer_size - len, dev, 0) + 1;
 
 	envp[i] = NULL;
 	return 0;
