aboutsummaryrefslogtreecommitdiff
path: root/drivers/dca/dca-sysfs.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-02-08 15:00:49 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 15:33:33 -0800
commit765cdb6cef63c0b41c3f6c9285769080b3f41bb0 (patch)
tree0a66a606936d51249b3b4545bbbe426c4e1be0c7 /drivers/dca/dca-sysfs.c
parent11b0cc3a4af65413ca3bb5698769e091486e0b22 (diff)
DCA: convert struct class_device to struct device.
Thanks to Kay for keeping us honest. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Cc: "Williams, Dan J" <dan.j.williams@intel.com> Acked-by: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/dca/dca-sysfs.c')
-rw-r--r--drivers/dca/dca-sysfs.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/dca/dca-sysfs.c b/drivers/dca/dca-sysfs.c
index 24a263b6844..011328faa5f 100644
--- a/drivers/dca/dca-sysfs.c
+++ b/drivers/dca/dca-sysfs.c
@@ -12,10 +12,10 @@ static spinlock_t dca_idr_lock;
int dca_sysfs_add_req(struct dca_provider *dca, struct device *dev, int slot)
{
- struct class_device *cd;
+ struct device *cd;
- cd = class_device_create(dca_class, dca->cd, MKDEV(0, slot + 1),
- dev, "requester%d", slot);
+ cd = device_create(dca_class, dca->cd, MKDEV(0, slot + 1),
+ "requester%d", slot);
if (IS_ERR(cd))
return PTR_ERR(cd);
return 0;
@@ -23,12 +23,12 @@ int dca_sysfs_add_req(struct dca_provider *dca, struct device *dev, int slot)
void dca_sysfs_remove_req(struct dca_provider *dca, int slot)
{
- class_device_destroy(dca_class, MKDEV(0, slot + 1));
+ device_destroy(dca_class, MKDEV(0, slot + 1));
}
int dca_sysfs_add_provider(struct dca_provider *dca, struct device *dev)
{
- struct class_device *cd;
+ struct device *cd;
int err = 0;
idr_try_again:
@@ -46,8 +46,7 @@ idr_try_again:
return err;
}
- cd = class_device_create(dca_class, NULL, MKDEV(0, 0),
- dev, "dca%d", dca->id);
+ cd = device_create(dca_class, dev, MKDEV(0, 0), "dca%d", dca->id);
if (IS_ERR(cd)) {
spin_lock(&dca_idr_lock);
idr_remove(&dca_idr, dca->id);
@@ -60,7 +59,7 @@ idr_try_again:
void dca_sysfs_remove_provider(struct dca_provider *dca)
{
- class_device_unregister(dca->cd);
+ device_unregister(dca->cd);
dca->cd = NULL;
spin_lock(&dca_idr_lock);
idr_remove(&dca_idr, dca->id);