git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git]
/
drivers
/
isdn
/
gigaset
/
proc.c
diff --git
a/drivers/isdn/gigaset/proc.c
b/drivers/isdn/gigaset/proc.c
index
d267a63
..
9ae3a7f
100644
(file)
--- a/
drivers/isdn/gigaset/proc.c
+++ b/
drivers/isdn/gigaset/proc.c
@@
-16,12
+16,11
@@
#include "gigaset.h"
#include <linux/ctype.h>
#include "gigaset.h"
#include <linux/ctype.h>
-static ssize_t show_cidmode(struct device *dev, struct device_attribute *attr,
- char *buf)
+static ssize_t show_cidmode(struct class_device *class, char *buf)
{
int ret;
unsigned long flags;
{
int ret;
unsigned long flags;
- struct cardstate *cs =
dev_get_drvdata(dev
);
+ struct cardstate *cs =
class_get_devdata(class
);
spin_lock_irqsave(&cs->lock, flags);
ret = sprintf(buf, "%u\n", cs->cidmode);
spin_lock_irqsave(&cs->lock, flags);
ret = sprintf(buf, "%u\n", cs->cidmode);
@@
-30,10
+29,10
@@
static ssize_t show_cidmode(struct device *dev, struct device_attribute *attr,
return ret;
}
return ret;
}
-static ssize_t set_cidmode(struct
device *dev, struct device_attribute *attr
,
+static ssize_t set_cidmode(struct
class_device *class
,
const char *buf, size_t count)
{
const char *buf, size_t count)
{
- struct cardstate *cs =
dev_get_drvdata(dev
);
+ struct cardstate *cs =
class_get_devdata(class
);
long int value;
char *end;
long int value;
char *end;
@@
-65,18
+64,24
@@
static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr,
return count;
}
return count;
}
-static DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode);
+static
CLASS_
DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode);
/* free sysfs for device */
void gigaset_free_dev_sysfs(struct cardstate *cs)
{
/* free sysfs for device */
void gigaset_free_dev_sysfs(struct cardstate *cs)
{
+ if (!cs->class)
+ return;
+
gig_dbg(DEBUG_INIT, "removing sysfs entries");
gig_dbg(DEBUG_INIT, "removing sysfs entries");
-
device_remove_file(cs->dev, &dev
_attr_cidmode);
+
class_device_remove_file(cs->class, &class_device
_attr_cidmode);
}
/* initialize sysfs for device */
void gigaset_init_dev_sysfs(struct cardstate *cs)
{
}
/* initialize sysfs for device */
void gigaset_init_dev_sysfs(struct cardstate *cs)
{
+ if (!cs->class)
+ return;
+
gig_dbg(DEBUG_INIT, "setting up sysfs");
gig_dbg(DEBUG_INIT, "setting up sysfs");
-
device_create_file(cs->dev, &dev
_attr_cidmode);
+
class_device_create_file(cs->class, &class_device
_attr_cidmode);
}
}