diff options
author | Tilman Schmidt <tilman@imap.cc> | 2008-02-06 04:38:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:12 -0500 |
commit | e468c04894f36045cf93d1384183a461014b6840 (patch) | |
tree | b734bbc4ee65f8282de5299dc200f47ea466067a /drivers/isdn/gigaset/gigaset.h | |
parent | 9d4bee2b9de9e30057a860d2d6794f874caffc5e (diff) |
Gigaset: permit module unload
Fix the initialization and reference counting of the Gigaset driver modules
so that they can be unloaded when they are not actually in use.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: Hansjoerg Lipp <hjlipp@web.de>
Cc: Greg KH <gregkh@suse.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn/gigaset/gigaset.h')
-rw-r--r-- | drivers/isdn/gigaset/gigaset.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index 92986a5d4055..f365993161fc 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h | |||
@@ -435,6 +435,7 @@ struct cardstate { | |||
435 | unsigned minor_index; | 435 | unsigned minor_index; |
436 | struct device *dev; | 436 | struct device *dev; |
437 | struct device *tty_dev; | 437 | struct device *tty_dev; |
438 | unsigned flags; | ||
438 | 439 | ||
439 | const struct gigaset_ops *ops; | 440 | const struct gigaset_ops *ops; |
440 | 441 | ||
@@ -539,7 +540,6 @@ struct gigaset_driver { | |||
539 | unsigned minor; | 540 | unsigned minor; |
540 | unsigned minors; | 541 | unsigned minors; |
541 | struct cardstate *cs; | 542 | struct cardstate *cs; |
542 | unsigned *flags; | ||
543 | int blocked; | 543 | int blocked; |
544 | 544 | ||
545 | const struct gigaset_ops *ops; | 545 | const struct gigaset_ops *ops; |
@@ -767,10 +767,6 @@ void gigaset_freedriver(struct gigaset_driver *drv); | |||
767 | void gigaset_debugdrivers(void); | 767 | void gigaset_debugdrivers(void); |
768 | struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty); | 768 | struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty); |
769 | struct cardstate *gigaset_get_cs_by_id(int id); | 769 | struct cardstate *gigaset_get_cs_by_id(int id); |
770 | |||
771 | /* For drivers without fixed assignment device<->cardstate (usb) */ | ||
772 | struct cardstate *gigaset_getunassignedcs(struct gigaset_driver *drv); | ||
773 | void gigaset_unassign(struct cardstate *cs); | ||
774 | void gigaset_blockdriver(struct gigaset_driver *drv); | 770 | void gigaset_blockdriver(struct gigaset_driver *drv); |
775 | 771 | ||
776 | /* Allocate and initialize card state. Calls hardware dependent | 772 | /* Allocate and initialize card state. Calls hardware dependent |
@@ -789,7 +785,7 @@ int gigaset_start(struct cardstate *cs); | |||
789 | void gigaset_stop(struct cardstate *cs); | 785 | void gigaset_stop(struct cardstate *cs); |
790 | 786 | ||
791 | /* Tell common.c that the driver is being unloaded. */ | 787 | /* Tell common.c that the driver is being unloaded. */ |
792 | void gigaset_shutdown(struct cardstate *cs); | 788 | int gigaset_shutdown(struct cardstate *cs); |
793 | 789 | ||
794 | /* Tell common.c that an skb has been sent. */ | 790 | /* Tell common.c that an skb has been sent. */ |
795 | void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *skb); | 791 | void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *skb); |