diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 08:41:41 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 13:07:53 -0400 |
commit | 816724e65c72a90a44fbad0ef0b59b186c85fa90 (patch) | |
tree | 421fa29aedff988e392f92780637553e275d37a0 /drivers/isdn | |
parent | 70ac4385a13f78bc478f26d317511893741b05bd (diff) | |
parent | d384ea691fe4ea8c2dd5b9b8d9042eb181776f18 (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Conflicts:
fs/nfs/inode.c
fs/super.c
Fix conflicts between patch 'NFS: Split fs/nfs/inode.c' and patch
'VFS: Permit filesystem to override root dentry on mount'
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/capi/capifs.c | 6 | ||||
-rw-r--r-- | drivers/isdn/gigaset/common.c | 13 | ||||
-rw-r--r-- | drivers/isdn/gigaset/gigaset.h | 1 | ||||
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 10 | ||||
-rw-r--r-- | drivers/isdn/gigaset/proc.c | 21 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_common.c | 8 | ||||
-rw-r--r-- | drivers/isdn/sc/ioctl.c | 1 |
7 files changed, 38 insertions, 22 deletions
diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index 0a37aded4b54..9ea6bd0ddc35 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c | |||
@@ -121,10 +121,10 @@ fail: | |||
121 | return -ENOMEM; | 121 | return -ENOMEM; |
122 | } | 122 | } |
123 | 123 | ||
124 | static struct super_block *capifs_get_sb(struct file_system_type *fs_type, | 124 | static int capifs_get_sb(struct file_system_type *fs_type, |
125 | int flags, const char *dev_name, void *data) | 125 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) |
126 | { | 126 | { |
127 | return get_sb_single(fs_type, flags, data, capifs_fill_super); | 127 | return get_sb_single(fs_type, flags, data, capifs_fill_super, mnt); |
128 | } | 128 | } |
129 | 129 | ||
130 | static struct file_system_type capifs_fs_type = { | 130 | static struct file_system_type capifs_fs_type = { |
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index e55767b2ccd3..acb7e2656780 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c | |||
@@ -460,6 +460,9 @@ void gigaset_freecs(struct cardstate *cs) | |||
460 | 460 | ||
461 | switch (cs->cs_init) { | 461 | switch (cs->cs_init) { |
462 | default: | 462 | default: |
463 | /* clear device sysfs */ | ||
464 | gigaset_free_dev_sysfs(cs); | ||
465 | |||
463 | gigaset_if_free(cs); | 466 | gigaset_if_free(cs); |
464 | 467 | ||
465 | gig_dbg(DEBUG_INIT, "clearing hw"); | 468 | gig_dbg(DEBUG_INIT, "clearing hw"); |
@@ -699,6 +702,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, | |||
699 | cs->open_count = 0; | 702 | cs->open_count = 0; |
700 | cs->dev = NULL; | 703 | cs->dev = NULL; |
701 | cs->tty = NULL; | 704 | cs->tty = NULL; |
705 | cs->class = NULL; | ||
702 | cs->cidmode = cidmode != 0; | 706 | cs->cidmode = cidmode != 0; |
703 | 707 | ||
704 | //if(onechannel) { //FIXME | 708 | //if(onechannel) { //FIXME |
@@ -760,6 +764,9 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, | |||
760 | 764 | ||
761 | gigaset_if_init(cs); | 765 | gigaset_if_init(cs); |
762 | 766 | ||
767 | /* set up device sysfs */ | ||
768 | gigaset_init_dev_sysfs(cs); | ||
769 | |||
763 | spin_lock_irqsave(&cs->lock, flags); | 770 | spin_lock_irqsave(&cs->lock, flags); |
764 | cs->running = 1; | 771 | cs->running = 1; |
765 | spin_unlock_irqrestore(&cs->lock, flags); | 772 | spin_unlock_irqrestore(&cs->lock, flags); |
@@ -902,9 +909,6 @@ int gigaset_start(struct cardstate *cs) | |||
902 | 909 | ||
903 | wait_event(cs->waitqueue, !cs->waiting); | 910 | wait_event(cs->waitqueue, !cs->waiting); |
904 | 911 | ||
905 | /* set up device sysfs */ | ||
906 | gigaset_init_dev_sysfs(cs); | ||
907 | |||
908 | mutex_unlock(&cs->mutex); | 912 | mutex_unlock(&cs->mutex); |
909 | return 1; | 913 | return 1; |
910 | 914 | ||
@@ -969,9 +973,6 @@ void gigaset_stop(struct cardstate *cs) | |||
969 | //FIXME | 973 | //FIXME |
970 | } | 974 | } |
971 | 975 | ||
972 | /* clear device sysfs */ | ||
973 | gigaset_free_dev_sysfs(cs); | ||
974 | |||
975 | cleanup_cs(cs); | 976 | cleanup_cs(cs); |
976 | 977 | ||
977 | exit: | 978 | exit: |
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index 22b9693f7c0a..8d63d822104f 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h | |||
@@ -445,6 +445,7 @@ struct cardstate { | |||
445 | struct gigaset_driver *driver; | 445 | struct gigaset_driver *driver; |
446 | unsigned minor_index; | 446 | unsigned minor_index; |
447 | struct device *dev; | 447 | struct device *dev; |
448 | struct class_device *class; | ||
448 | 449 | ||
449 | const struct gigaset_ops *ops; | 450 | const struct gigaset_ops *ops; |
450 | 451 | ||
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index 08e4c4eea14d..74fd234956c8 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -625,7 +625,14 @@ void gigaset_if_init(struct cardstate *cs) | |||
625 | return; | 625 | return; |
626 | 626 | ||
627 | tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs); | 627 | tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs); |
628 | tty_register_device(drv->tty, cs->minor_index, NULL); | 628 | cs->class = tty_register_device(drv->tty, cs->minor_index, NULL); |
629 | |||
630 | if (!IS_ERR(cs->class)) | ||
631 | class_set_devdata(cs->class, cs); | ||
632 | else { | ||
633 | warn("could not register device to the tty subsystem"); | ||
634 | cs->class = NULL; | ||
635 | } | ||
629 | } | 636 | } |
630 | 637 | ||
631 | void gigaset_if_free(struct cardstate *cs) | 638 | void gigaset_if_free(struct cardstate *cs) |
@@ -638,6 +645,7 @@ void gigaset_if_free(struct cardstate *cs) | |||
638 | 645 | ||
639 | tasklet_disable(&cs->if_wake_tasklet); | 646 | tasklet_disable(&cs->if_wake_tasklet); |
640 | tasklet_kill(&cs->if_wake_tasklet); | 647 | tasklet_kill(&cs->if_wake_tasklet); |
648 | cs->class = NULL; | ||
641 | tty_unregister_device(drv->tty, cs->minor_index); | 649 | tty_unregister_device(drv->tty, cs->minor_index); |
642 | } | 650 | } |
643 | 651 | ||
diff --git a/drivers/isdn/gigaset/proc.c b/drivers/isdn/gigaset/proc.c index d267a636b53c..9ae3a7f3e7b3 100644 --- a/drivers/isdn/gigaset/proc.c +++ b/drivers/isdn/gigaset/proc.c | |||
@@ -16,12 +16,11 @@ | |||
16 | #include "gigaset.h" | 16 | #include "gigaset.h" |
17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
18 | 18 | ||
19 | static ssize_t show_cidmode(struct device *dev, struct device_attribute *attr, | 19 | static ssize_t show_cidmode(struct class_device *class, char *buf) |
20 | char *buf) | ||
21 | { | 20 | { |
22 | int ret; | 21 | int ret; |
23 | unsigned long flags; | 22 | unsigned long flags; |
24 | struct cardstate *cs = dev_get_drvdata(dev); | 23 | struct cardstate *cs = class_get_devdata(class); |
25 | 24 | ||
26 | spin_lock_irqsave(&cs->lock, flags); | 25 | spin_lock_irqsave(&cs->lock, flags); |
27 | ret = sprintf(buf, "%u\n", cs->cidmode); | 26 | ret = sprintf(buf, "%u\n", cs->cidmode); |
@@ -30,10 +29,10 @@ static ssize_t show_cidmode(struct device *dev, struct device_attribute *attr, | |||
30 | return ret; | 29 | return ret; |
31 | } | 30 | } |
32 | 31 | ||
33 | static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr, | 32 | static ssize_t set_cidmode(struct class_device *class, |
34 | const char *buf, size_t count) | 33 | const char *buf, size_t count) |
35 | { | 34 | { |
36 | struct cardstate *cs = dev_get_drvdata(dev); | 35 | struct cardstate *cs = class_get_devdata(class); |
37 | long int value; | 36 | long int value; |
38 | char *end; | 37 | char *end; |
39 | 38 | ||
@@ -65,18 +64,24 @@ static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr, | |||
65 | return count; | 64 | return count; |
66 | } | 65 | } |
67 | 66 | ||
68 | static DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode); | 67 | static CLASS_DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode); |
69 | 68 | ||
70 | /* free sysfs for device */ | 69 | /* free sysfs for device */ |
71 | void gigaset_free_dev_sysfs(struct cardstate *cs) | 70 | void gigaset_free_dev_sysfs(struct cardstate *cs) |
72 | { | 71 | { |
72 | if (!cs->class) | ||
73 | return; | ||
74 | |||
73 | gig_dbg(DEBUG_INIT, "removing sysfs entries"); | 75 | gig_dbg(DEBUG_INIT, "removing sysfs entries"); |
74 | device_remove_file(cs->dev, &dev_attr_cidmode); | 76 | class_device_remove_file(cs->class, &class_device_attr_cidmode); |
75 | } | 77 | } |
76 | 78 | ||
77 | /* initialize sysfs for device */ | 79 | /* initialize sysfs for device */ |
78 | void gigaset_init_dev_sysfs(struct cardstate *cs) | 80 | void gigaset_init_dev_sysfs(struct cardstate *cs) |
79 | { | 81 | { |
82 | if (!cs->class) | ||
83 | return; | ||
84 | |||
80 | gig_dbg(DEBUG_INIT, "setting up sysfs"); | 85 | gig_dbg(DEBUG_INIT, "setting up sysfs"); |
81 | device_create_file(cs->dev, &dev_attr_cidmode); | 86 | class_device_create_file(cs->class, &class_device_attr_cidmode); |
82 | } | 87 | } |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 22759c01746a..81accdf35168 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -1177,9 +1177,8 @@ isdn_write(struct file *file, const char __user *buf, size_t count, loff_t * off | |||
1177 | goto out; | 1177 | goto out; |
1178 | } | 1178 | } |
1179 | chidx = isdn_minor2chan(minor); | 1179 | chidx = isdn_minor2chan(minor); |
1180 | while (isdn_writebuf_stub(drvidx, chidx, buf, count) != count) | 1180 | while ((retval = isdn_writebuf_stub(drvidx, chidx, buf, count)) == 0) |
1181 | interruptible_sleep_on(&dev->drv[drvidx]->snd_waitq[chidx]); | 1181 | interruptible_sleep_on(&dev->drv[drvidx]->snd_waitq[chidx]); |
1182 | retval = count; | ||
1183 | goto out; | 1182 | goto out; |
1184 | } | 1183 | } |
1185 | if (minor <= ISDN_MINOR_CTRLMAX) { | 1184 | if (minor <= ISDN_MINOR_CTRLMAX) { |
@@ -1951,9 +1950,10 @@ isdn_writebuf_stub(int drvidx, int chan, const u_char __user * buf, int len) | |||
1951 | struct sk_buff *skb = alloc_skb(hl + len, GFP_ATOMIC); | 1950 | struct sk_buff *skb = alloc_skb(hl + len, GFP_ATOMIC); |
1952 | 1951 | ||
1953 | if (!skb) | 1952 | if (!skb) |
1954 | return 0; | 1953 | return -ENOMEM; |
1955 | skb_reserve(skb, hl); | 1954 | skb_reserve(skb, hl); |
1956 | copy_from_user(skb_put(skb, len), buf, len); | 1955 | if (copy_from_user(skb_put(skb, len), buf, len)) |
1956 | return -EFAULT; | ||
1957 | ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb); | 1957 | ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb); |
1958 | if (ret <= 0) | 1958 | if (ret <= 0) |
1959 | dev_kfree_skb(skb); | 1959 | dev_kfree_skb(skb); |
diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c index f4f71226a078..57c4ab96d136 100644 --- a/drivers/isdn/sc/ioctl.c +++ b/drivers/isdn/sc/ioctl.c | |||
@@ -97,6 +97,7 @@ int sc_ioctl(int card, scs_ioctl *data) | |||
97 | 97 | ||
98 | case SCIOCSTART: | 98 | case SCIOCSTART: |
99 | { | 99 | { |
100 | kfree(rcvmsg); | ||
100 | pr_debug("%s: SCIOSTART: ioctl received\n", | 101 | pr_debug("%s: SCIOSTART: ioctl received\n", |
101 | sc_adapter[card]->devicename); | 102 | sc_adapter[card]->devicename); |
102 | if(sc_adapter[card]->EngineUp) { | 103 | if(sc_adapter[card]->EngineUp) { |