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
fedora core 6 1.2949 + vserver 2.2.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
9ae3a7f
..
e767afa
100644
(file)
--- a/
drivers/isdn/gigaset/proc.c
+++ b/
drivers/isdn/gigaset/proc.c
@@
-16,11
+16,12
@@
#include "gigaset.h"
#include <linux/ctype.h>
#include "gigaset.h"
#include <linux/ctype.h>
-static ssize_t show_cidmode(struct class_device *class, char *buf)
+static ssize_t show_cidmode(struct device *dev,
+ struct device_attribute *attr, char *buf)
{
int ret;
unsigned long flags;
{
int ret;
unsigned long flags;
- struct cardstate *cs =
class_get_devdata(class
);
+ struct cardstate *cs =
dev_get_drvdata(dev
);
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);
@@
-29,10
+30,10
@@
static ssize_t show_cidmode(struct class_device *class, char *buf)
return ret;
}
return ret;
}
-static ssize_t set_cidmode(struct
class_device *class
,
+static ssize_t set_cidmode(struct
device *dev, struct device_attribute *attr
,
const char *buf, size_t count)
{
const char *buf, size_t count)
{
- struct cardstate *cs =
class_get_devdata(class
);
+ struct cardstate *cs =
dev_get_drvdata(dev
);
long int value;
char *end;
long int value;
char *end;
@@
-64,24
+65,25
@@
static ssize_t set_cidmode(struct class_device *class,
return count;
}
return count;
}
-static
CLASS_
DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode);
+static 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
)
+ if (!cs->
tty_dev
)
return;
gig_dbg(DEBUG_INIT, "removing sysfs entries");
return;
gig_dbg(DEBUG_INIT, "removing sysfs entries");
-
class_device_remove_file(cs->class, &class_device
_attr_cidmode);
+
device_remove_file(cs->tty_dev, &dev
_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
)
+ if (!cs->
tty_dev
)
return;
gig_dbg(DEBUG_INIT, "setting up sysfs");
return;
gig_dbg(DEBUG_INIT, "setting up sysfs");
- class_device_create_file(cs->class, &class_device_attr_cidmode);
+ if (device_create_file(cs->tty_dev, &dev_attr_cidmode))
+ dev_err(cs->dev, "could not create sysfs attribute\n");
}
}