Skip to contentSkip to conversation

media: cec: name for RC passthrough device does not need 'RC for'

PATCH In review Sean Young 2 participants 3 messages Oct 5, 2018

Subsystems (2)
lore
Share & tools
lore

Sean Young

author
#0 lore raw

PATCH 1/1 media: cec: name for RC passthrough device does not need 'RC for'

An RC device is does not need to be called 'RC for'. Simply the name will suffice.

---
 drivers/media/cec/cec-core.c | 6 ++----
 include/media/cec.h          | 2 --
 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/media/cec/cec-core.c +2 -4
index 74596f089ec9..e4edc930d4ed 100644
@@ -307,12 +307,10 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
 		return ERR_PTR(-ENOMEM);
 	}
 
-	snprintf(adap->device_name, sizeof(adap->device_name),
-		 "RC for %s", name);
 	snprintf(adap->input_phys, sizeof(adap->input_phys),
-		 "%s/input0", name);
+		 "%s/input0", adap->name);
 
-	adap->rc->device_name = adap->device_name;
+	adap->rc->device_name = adap->name;
 	adap->rc->input_phys = adap->input_phys;
 	adap->rc->input_id.bustype = BUS_CEC;
 	adap->rc->input_id.vendor = 0;
include/media/cec.h +0 -2
index 9f382f0c2970..73ed28b076ce 100644
@@ -198,9 +198,7 @@ struct cec_adapter {
 	u16 phys_addrs[15];
 	u32 sequence;
 
-	char device_name[32];
 	char input_phys[32];
-	char input_drv[32];
 };
 
 static inline void *cec_get_drvdata(const struct cec_adapter *adap)
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Sean Young

An RC device is does not need to be called 'RC for'. Simply the name will suffice.

OK if I take this patch? I have a cec pull request upcoming anyway.

Regards,

Hans

Quoted 39 lines
---
 drivers/media/cec/cec-core.c | 6 ++----
 include/media/cec.h          | 2 --
 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/media/cec/cec-core.c +2 -4
index 74596f089ec9..e4edc930d4ed 100644
@@ -307,12 +307,10 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
 		return ERR_PTR(-ENOMEM);
 	}
 
-	snprintf(adap->device_name, sizeof(adap->device_name),
-		 "RC for %s", name);
 	snprintf(adap->input_phys, sizeof(adap->input_phys),
-		 "%s/input0", name);
+		 "%s/input0", adap->name);
 
-	adap->rc->device_name = adap->device_name;
+	adap->rc->device_name = adap->name;
 	adap->rc->input_phys = adap->input_phys;
 	adap->rc->input_id.bustype = BUS_CEC;
 	adap->rc->input_id.vendor = 0;
include/media/cec.h +0 -2
index 9f382f0c2970..73ed28b076ce 100644
@@ -198,9 +198,7 @@ struct cec_adapter {
 	u16 phys_addrs[15];
 	u32 sequence;
 
-	char device_name[32];
 	char input_phys[32];
-	char input_drv[32];
 };
 
 static inline void *cec_get_drvdata(const struct cec_adapter *adap)