Skip to content

Commit

Permalink
usb: charger: assign specific number for enum value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Chen authored and Greg Kroah-Hartman committed Feb 10, 2020
1 parent 3e99862 commit ca4b43c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/uapi/linux/usb/charger.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit ca4b43c

Please sign in to comment.