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>

authored by Kay Sievers and committed by Linus Torvalds 765cdb6c 11b0cc3a

+8 -9
+7 -8
drivers/dca/dca-sysfs.c
··· 12 12 13 13 int dca_sysfs_add_req(struct dca_provider *dca, struct device *dev, int slot) 14 14 { 15 - struct class_device *cd; 15 + struct device *cd; 16 16 17 - cd = class_device_create(dca_class, dca->cd, MKDEV(0, slot + 1), 18 - dev, "requester%d", slot); 17 + cd = device_create(dca_class, dca->cd, MKDEV(0, slot + 1), 18 + "requester%d", slot); 19 19 if (IS_ERR(cd)) 20 20 return PTR_ERR(cd); 21 21 return 0; ··· 23 23 24 24 void dca_sysfs_remove_req(struct dca_provider *dca, int slot) 25 25 { 26 - class_device_destroy(dca_class, MKDEV(0, slot + 1)); 26 + device_destroy(dca_class, MKDEV(0, slot + 1)); 27 27 } 28 28 29 29 int dca_sysfs_add_provider(struct dca_provider *dca, struct device *dev) 30 30 { 31 - struct class_device *cd; 31 + struct device *cd; 32 32 int err = 0; 33 33 34 34 idr_try_again: ··· 46 46 return err; 47 47 } 48 48 49 - cd = class_device_create(dca_class, NULL, MKDEV(0, 0), 50 - dev, "dca%d", dca->id); 49 + cd = device_create(dca_class, dev, MKDEV(0, 0), "dca%d", dca->id); 51 50 if (IS_ERR(cd)) { 52 51 spin_lock(&dca_idr_lock); 53 52 idr_remove(&dca_idr, dca->id); ··· 59 60 60 61 void dca_sysfs_remove_provider(struct dca_provider *dca) 61 62 { 62 - class_device_unregister(dca->cd); 63 + device_unregister(dca->cd); 63 64 dca->cd = NULL; 64 65 spin_lock(&dca_idr_lock); 65 66 idr_remove(&dca_idr, dca->id);
+1 -1
include/linux/dca.h
··· 11 11 12 12 struct dca_provider { 13 13 struct dca_ops *ops; 14 - struct class_device *cd; 14 + struct device *cd; 15 15 int id; 16 16 }; 17 17