hwspinlock/core: simplify 'owner' handling
Use struct device_driver's owner member instead of asking drivers to
explicitly pass the owner again.
This simplifies drivers and also save some memory, since there's no
point now in maintaining a separate owner pointer per hwspinlock.
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
diff --git a/drivers/hwspinlock/hwspinlock_internal.h b/drivers/hwspinlock/hwspinlock_internal.h
index 69935e6..fb25830 100644
--- a/drivers/hwspinlock/hwspinlock_internal.h
+++ b/drivers/hwspinlock/hwspinlock_internal.h
@@ -44,10 +44,9 @@
* @ops: platform-specific hwspinlock handlers
* @id: a global, unique, system-wide, index of the lock.
* @lock: initialized and used by hwspinlock core
- * @owner: underlying implementation module, used to maintain module ref count
*
* Note: currently simplicity was opted for, but later we can squeeze some
- * memory bytes by grouping the dev, ops and owner members in a single
+ * memory bytes by grouping dev, ops in a single
* per-platform struct, and have all hwspinlocks point at it.
*/
struct hwspinlock {
@@ -55,7 +54,6 @@
const struct hwspinlock_ops *ops;
int id;
spinlock_t lock;
- struct module *owner;
};
#endif /* __HWSPINLOCK_HWSPINLOCK_H */