summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset/proc.c
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2006-04-10 22:55:07 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 06:18:49 -0700
commitb1d47464c947f08125dc4ac4a2321ced9e2fed29 (patch)
tree6a977f4335c5a2ab734779fb52565c81eb61bb1b /drivers/isdn/gigaset/proc.c
parent784d5858aac58c06608def862d73ae9a32f5ee23 (diff)
[PATCH] isdn4linux: Siemens Gigaset drivers: sysfs usage
With Hansjoerg Lipp <hjlipp@web.de> Correct the way the Gigaset drivers create their sysfs entries. Signed-off-by: Hansjoerg Lipp <hjlipp@web.de> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/gigaset/proc.c')
-rw-r--r--drivers/isdn/gigaset/proc.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/isdn/gigaset/proc.c b/drivers/isdn/gigaset/proc.c
index 695495ad066..912fed67074 100644
--- a/drivers/isdn/gigaset/proc.c
+++ b/drivers/isdn/gigaset/proc.c
@@ -19,16 +19,14 @@
static ssize_t show_cidmode(struct device *dev, struct device_attribute *attr,
char *buf)
{
- struct usb_interface *intf = to_usb_interface(dev);
- struct cardstate *cs = usb_get_intfdata(intf);
+ struct cardstate *cs = dev_get_drvdata(dev);
return sprintf(buf, "%d\n", atomic_read(&cs->cidmode));
}
static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
- struct usb_interface *intf = to_usb_interface(dev);
- struct cardstate *cs = usb_get_intfdata(intf);
+ struct cardstate *cs = dev_get_drvdata(dev);
long int value;
char *end;
@@ -63,17 +61,15 @@ static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr,
static DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode);
/* free sysfs for device */
-void gigaset_free_dev_sysfs(struct usb_interface *interface)
+void gigaset_free_dev_sysfs(struct cardstate *cs)
{
gig_dbg(DEBUG_INIT, "removing sysfs entries");
- device_remove_file(&interface->dev, &dev_attr_cidmode);
+ device_remove_file(cs->dev, &dev_attr_cidmode);
}
-EXPORT_SYMBOL_GPL(gigaset_free_dev_sysfs);
/* initialize sysfs for device */
-void gigaset_init_dev_sysfs(struct usb_interface *interface)
+void gigaset_init_dev_sysfs(struct cardstate *cs)
{
gig_dbg(DEBUG_INIT, "setting up sysfs");
- device_create_file(&interface->dev, &dev_attr_cidmode);
+ device_create_file(cs->dev, &dev_attr_cidmode);
}
-EXPORT_SYMBOL_GPL(gigaset_init_dev_sysfs);