projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e99862
)
usb: charger: assign specific number for enum value
author
Peter Chen
<peter.chen@nxp.com>
Sat, 1 Feb 2020 06:13:44 +0000
(14:13 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 10 Feb 2020 19:08:30 +0000
(11:08 -0800)
To work properly on every architectures and compilers, the enum value
needs to be specific numbers.
Suggested-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Link:
https://lore.kernel.org/r/1580537624-10179-1-git-send-email-peter.chen@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/uapi/linux/usb/charger.h
patch
|
blob
|
history
diff --git
a/include/uapi/linux/usb/charger.h
b/include/uapi/linux/usb/charger.h
index 5f72af35b3ed768fd3bc1e2d8ca3f4f6ecaea47f..ad22079125bff2ba34f03b74e6cfd5e2eb460479 100644
(file)
--- a/
include/uapi/linux/usb/charger.h
+++ b/
include/uapi/linux/usb/charger.h
@@
-14,18
+14,18
@@
* ACA (Accessory Charger Adapters)
*/
enum usb_charger_type {
- UNKNOWN_TYPE,
- SDP_TYPE,
- DCP_TYPE,
- CDP_TYPE,
- ACA_TYPE,
+ UNKNOWN_TYPE
= 0
,
+ SDP_TYPE
= 1
,
+ DCP_TYPE
= 2
,
+ CDP_TYPE
= 3
,
+ ACA_TYPE
= 4
,
};
/* USB charger state */
enum usb_charger_state {
- USB_CHARGER_DEFAULT,
- USB_CHARGER_PRESENT,
- USB_CHARGER_ABSENT,
+ USB_CHARGER_DEFAULT
= 0
,
+ USB_CHARGER_PRESENT
= 1
,
+ USB_CHARGER_ABSENT
= 2
,
};
#endif /* _UAPI__LINUX_USB_CHARGER_H */