Skip to contentSkip to conversation

Extcon: Minor change in the declaration of cable_names

PATCH 함명주 2 participants 2 messages Aug 20, 2012

lore
Share & tools
lore

함명주

author
#0 lore raw
Quoted 6 lines

From: anish kumar <[email protected]>

Instead of "const char **supported_cable" it is better to have it as "const char *const *supported_cable".

Could you please elaborate on why it's better?

(Is this fixing the using the standard naming issue Mark mentioned before?)

Cheers!
MyungJoo

Quoted 41 lines
---
 include/linux/extcon.h                 |    2 +-
 include/linux/extcon/extcon-adc-jack.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/extcon.h +1 -1
index cdd4014..a6bcc29 100644
@@ -111,7 +111,7 @@ struct extcon_cable;
 struct extcon_dev {
 	/* --- Optional user initializing data --- */
 	const char	*name;
-	const char **supported_cable;
+	const char *const *supported_cable;
 	const u32	*mutually_exclusive;
 
 	/* --- Optional callbacks to override class functions --- */
include/linux/extcon/extcon-adc-jack.h +1 -1
index 20e9eef..f27f2e8 100644
@@ -60,7 +60,7 @@ struct adc_jack_pdata {
 	/*
 	 * The last entry should be NULL
 	 */
-	const char **cable_names;
+	const char *const *cable_names;
 	/* The last entry's state should be 0 */
 	struct adc_jack_cond *adc_conditions;
 
Signature · 1 line
1.7.1

�淸�{.n�+돴윯돪�+%듚�깁負쪐w��{.n�+돴쪐{깸G쳺��{ay����,j�f"톒쉹��묎�z_溫(�쉸듶줷"얎�m����G쳺�◀?솳鈺�&x�~뤳턨O뺞촾퇉v�^�m��� �띠�◀?뻀�

#1 lore raw
Quoted 10 lines · 함명주
Quoted 6 lines

From: anish kumar <[email protected]>

Instead of "const char **supported_cable" it is better to have it as "const char *const *supported_cable".

Could you please elaborate on why it's better?

(Is this fixing the using the standard naming issue Mark mentioned before?)

No, It is what Lars(Lars-Peter Clausen) mentioned when he was doing the review earlier.It is nothing but a general practise as cable_names is constant.

Quoted 46 lines

Cheers!
MyungJoo

Quoted 41 lines
---
 include/linux/extcon.h                 |    2 +-
 include/linux/extcon/extcon-adc-jack.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/extcon.h +1 -1
index cdd4014..a6bcc29 100644
@@ -111,7 +111,7 @@ struct extcon_cable;
 struct extcon_dev {
 	/* --- Optional user initializing data --- */
 	const char	*name;
-	const char **supported_cable;
+	const char *const *supported_cable;
 	const u32	*mutually_exclusive;
 
 	/* --- Optional callbacks to override class functions --- */
include/linux/extcon/extcon-adc-jack.h +1 -1
index 20e9eef..f27f2e8 100644
@@ -60,7 +60,7 @@ struct adc_jack_pdata {
 	/*
 	 * The last entry should be NULL
 	 */
-	const char **cable_names;
+	const char *const *cable_names;
 	/* The last entry's state should be 0 */
 	struct adc_jack_cond *adc_conditions;
 
Signature · 1 line
1.7.1