|
@@ -20,8 +20,10 @@ struct cec_notifier;
|
|
|
#if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLED(CONFIG_CEC_NOTIFIER)
|
|
|
|
|
|
/**
|
|
|
- * cec_notifier_get - find or create a new cec_notifier for the given device.
|
|
|
+ * cec_notifier_get_conn - find or create a new cec_notifier for the given
|
|
|
+ * device and connector tuple.
|
|
|
* @dev: device that sends the events.
|
|
|
+ * @conn: the connector name from which the event occurs
|
|
|
*
|
|
|
* If a notifier for device @dev already exists, then increase the refcount
|
|
|
* and return that notifier.
|
|
@@ -31,7 +33,8 @@ struct cec_notifier;
|
|
|
*
|
|
|
* Return NULL if the memory could not be allocated.
|
|
|
*/
|
|
|
-struct cec_notifier *cec_notifier_get(struct device *dev);
|
|
|
+struct cec_notifier *cec_notifier_get_conn(struct device *dev,
|
|
|
+ const char *conn);
|
|
|
|
|
|
/**
|
|
|
* cec_notifier_put - decrease refcount and delete when the refcount reaches 0.
|
|
@@ -85,7 +88,8 @@ void cec_register_cec_notifier(struct cec_adapter *adap,
|
|
|
struct cec_notifier *notifier);
|
|
|
|
|
|
#else
|
|
|
-static inline struct cec_notifier *cec_notifier_get(struct device *dev)
|
|
|
+static inline struct cec_notifier *cec_notifier_get_conn(struct device *dev,
|
|
|
+ const char *conn)
|
|
|
{
|
|
|
/* A non-NULL pointer is expected on success */
|
|
|
return (struct cec_notifier *)0xdeadfeed;
|
|
@@ -120,6 +124,23 @@ static inline void cec_register_cec_notifier(struct cec_adapter *adap,
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
+/**
|
|
|
+ * cec_notifier_get - find or create a new cec_notifier for the given device.
|
|
|
+ * @dev: device that sends the events.
|
|
|
+ *
|
|
|
+ * If a notifier for device @dev already exists, then increase the refcount
|
|
|
+ * and return that notifier.
|
|
|
+ *
|
|
|
+ * If it doesn't exist, then allocate a new notifier struct and return a
|
|
|
+ * pointer to that new struct.
|
|
|
+ *
|
|
|
+ * Return NULL if the memory could not be allocated.
|
|
|
+ */
|
|
|
+static inline struct cec_notifier *cec_notifier_get(struct device *dev)
|
|
|
+{
|
|
|
+ return cec_notifier_get_conn(dev, NULL);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* cec_notifier_phys_addr_invalidate() - set the physical address to INVALID
|
|
|
*
|