[PATCH 29/31] esp: Auto-load esp module when device opened.

From: Tim Gardner
Date: Tue Mar 10 2009 - 12:47:47 EST


The esp module is missing the char-major-57-* alias that would cause it
to be auto-loaded when a device of that type is opened. This patch adds
the alias.

Signed-off-by: Scott James Remnant <scott@xxxxxxxxxxxxx>
Signed-off-by: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
---
drivers/char/esp.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index 45ec263..0a643f6 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -51,6 +51,7 @@
#include <linux/serialP.h>
#include <linux/serial_reg.h>
#include <linux/major.h>
+#include <linux/device.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
@@ -85,6 +86,8 @@ static unsigned int rx_timeout = ESP_RX_TMOUT;
static unsigned int pio_threshold = ESP_PIO_THRESHOLD;

MODULE_LICENSE("GPL");
+MODULE_ALIAS_CHARDEV_MAJOR(ESP_IN_MAJOR);
+

module_param_array(irq, int, NULL, 0);
module_param_array(divisor, uint, NULL, 0);
--
1.6.0.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/