[PATCH v2 10/26] staging: most: core: remove struct device from struct most_aim

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch removes the struct device from the most_aim as it is not
needed.

Signed-off-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx>
---
v2: fix patch numeration

 drivers/staging/most/core.c | 17 -----------------
 drivers/staging/most/core.h |  1 -
 2 files changed, 18 deletions(-)

diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c
index 45afec9..3cf72a1 100644
--- a/drivers/staging/most/core.c
+++ b/drivers/staging/most/core.c
@@ -1313,32 +1313,16 @@ int most_stop_channel(struct most_interface *iface, int id,
 }
 EXPORT_SYMBOL_GPL(most_stop_channel);
 
-void release_aim(struct device *dev)
-{
-	pr_info("releasing aim %s\n", dev_name(dev));
-}
-
 /**
  * most_register_aim - registers an AIM (driver) with the core
  * @aim: instance of AIM to be registered
  */
 int most_register_aim(struct most_aim *aim)
 {
-	int ret;
-
 	if (!aim) {
 		pr_err("Bad driver\n");
 		return -EINVAL;
 	}
-	aim->dev.init_name = aim->name;
-	aim->dev.bus = &mc.bus;
-	aim->dev.parent = &mc.dev;
-	aim->dev.release = release_aim;
-	ret = device_register(&aim->dev);
-	if (ret) {
-		pr_err("registering device %s failed\n", aim->name);
-		return ret;
-	}
 	list_add_tail(&aim->list, &mc.mod_list);
 	pr_info("registered new application interfacing module %s\n", aim->name);
 	return 0;
@@ -1370,7 +1354,6 @@ int most_deregister_aim(struct most_aim *aim)
 				c->pipe1.aim = NULL;
 		}
 	}
-	device_unregister(&aim->dev);
 	list_del(&aim->list);
 	pr_info("deregistering application interfacing module %s\n", aim->name);
 	return 0;
diff --git a/drivers/staging/most/core.h b/drivers/staging/most/core.h
index eb12c62..c449e55 100644
--- a/drivers/staging/most/core.h
+++ b/drivers/staging/most/core.h
@@ -267,7 +267,6 @@ struct most_interface {
  * @context: context pointer to be used by mostcore
  */
 struct most_aim {
-	struct device dev;
 	struct list_head list;
 	const char *name;
 	int (*probe_channel)(struct most_interface *iface, int channel_idx,
-- 
1.9.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux