diff options
author | Jan Kiszka <jan.kiszka@web.de> | 2010-02-08 10:12:26 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-16 16:01:27 -0800 |
commit | e95ac143868752ad30d93068a6fc0b39cf3a1bf4 (patch) | |
tree | 0f0cfb360833f9daf955a6610b7d5d26d548246c /drivers/isdn/capi | |
parent | 40fb2d0da77df5d39f1ba8878502725ebb806554 (diff) | |
download | kernel_goldelico_gta04-e95ac143868752ad30d93068a6fc0b39cf3a1bf4.zip kernel_goldelico_gta04-e95ac143868752ad30d93068a6fc0b39cf3a1bf4.tar.gz kernel_goldelico_gta04-e95ac143868752ad30d93068a6fc0b39cf3a1bf4.tar.bz2 |
CAPI: Use dynamic major for NCCI TTYs by default
No need to allocate a fixed major for this TTY, both capifs and udev
make this transparent to the user.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/capi')
-rw-r--r-- | drivers/isdn/capi/capi.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 901b79b..b1de0cb 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -60,10 +60,8 @@ module_param_named(major, capi_major, uint, 0); #define CAPINC_NR_PORTS 32 #define CAPINC_MAX_PORTS 256 -static int capi_ttymajor = 191; static int capi_ttyminors = CAPINC_NR_PORTS; -module_param_named(ttymajor, capi_ttymajor, uint, 0); module_param_named(ttyminors, capi_ttyminors, uint, 0); #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ @@ -301,6 +299,7 @@ static struct capiminor *capiminor_get(unsigned int minor) static void capincci_alloc_minor(struct capidev *cdev, struct capincci *np) { struct capiminor *mp; + dev_t device; if (!(cdev->userflags & CAPIFLAG_HIGHJACKING)) return; @@ -311,9 +310,8 @@ static void capincci_alloc_minor(struct capidev *cdev, struct capincci *np) #ifdef _DEBUG_REFCOUNT printk(KERN_DEBUG "set mp->nccip\n"); #endif - mp->capifs_dentry = - capifs_new_ncci(mp->minor, - MKDEV(capi_ttymajor, mp->minor)); + device = MKDEV(capinc_tty_driver->major, mp->minor); + mp->capifs_dentry = capifs_new_ncci(mp->minor, device); } } @@ -1341,7 +1339,7 @@ static int __init capinc_tty_init(void) drv->owner = THIS_MODULE; drv->driver_name = "capi_nc"; drv->name = "capi"; - drv->major = capi_ttymajor; + drv->major = 0; drv->minor_start = 0; drv->type = TTY_DRIVER_TYPE_SERIAL; drv->subtype = SERIAL_TYPE_NORMAL; |