mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
HID: nintendo: fix initializer element is not constant error
[ Upstream commit 0b7dd38c1c
]
With gcc-7 builds, an error happens with the controller button values being
defined as const. Change to a define.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312141227.C2h1IzfI-lkp@intel.com/
Signed-off-by: Ryan McClelland <rymcclel@gmail.com>
Reviewed-by: Daniel J. Ogorchock <djogorchock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
3e0e4a900f
commit
8e2609cbde
@ -325,28 +325,28 @@ struct joycon_imu_cal {
|
|||||||
* All the controller's button values are stored in a u32.
|
* All the controller's button values are stored in a u32.
|
||||||
* They can be accessed with bitwise ANDs.
|
* They can be accessed with bitwise ANDs.
|
||||||
*/
|
*/
|
||||||
static const u32 JC_BTN_Y = BIT(0);
|
#define JC_BTN_Y BIT(0)
|
||||||
static const u32 JC_BTN_X = BIT(1);
|
#define JC_BTN_X BIT(1)
|
||||||
static const u32 JC_BTN_B = BIT(2);
|
#define JC_BTN_B BIT(2)
|
||||||
static const u32 JC_BTN_A = BIT(3);
|
#define JC_BTN_A BIT(3)
|
||||||
static const u32 JC_BTN_SR_R = BIT(4);
|
#define JC_BTN_SR_R BIT(4)
|
||||||
static const u32 JC_BTN_SL_R = BIT(5);
|
#define JC_BTN_SL_R BIT(5)
|
||||||
static const u32 JC_BTN_R = BIT(6);
|
#define JC_BTN_R BIT(6)
|
||||||
static const u32 JC_BTN_ZR = BIT(7);
|
#define JC_BTN_ZR BIT(7)
|
||||||
static const u32 JC_BTN_MINUS = BIT(8);
|
#define JC_BTN_MINUS BIT(8)
|
||||||
static const u32 JC_BTN_PLUS = BIT(9);
|
#define JC_BTN_PLUS BIT(9)
|
||||||
static const u32 JC_BTN_RSTICK = BIT(10);
|
#define JC_BTN_RSTICK BIT(10)
|
||||||
static const u32 JC_BTN_LSTICK = BIT(11);
|
#define JC_BTN_LSTICK BIT(11)
|
||||||
static const u32 JC_BTN_HOME = BIT(12);
|
#define JC_BTN_HOME BIT(12)
|
||||||
static const u32 JC_BTN_CAP = BIT(13); /* capture button */
|
#define JC_BTN_CAP BIT(13) /* capture button */
|
||||||
static const u32 JC_BTN_DOWN = BIT(16);
|
#define JC_BTN_DOWN BIT(16)
|
||||||
static const u32 JC_BTN_UP = BIT(17);
|
#define JC_BTN_UP BIT(17)
|
||||||
static const u32 JC_BTN_RIGHT = BIT(18);
|
#define JC_BTN_RIGHT BIT(18)
|
||||||
static const u32 JC_BTN_LEFT = BIT(19);
|
#define JC_BTN_LEFT BIT(19)
|
||||||
static const u32 JC_BTN_SR_L = BIT(20);
|
#define JC_BTN_SR_L BIT(20)
|
||||||
static const u32 JC_BTN_SL_L = BIT(21);
|
#define JC_BTN_SL_L BIT(21)
|
||||||
static const u32 JC_BTN_L = BIT(22);
|
#define JC_BTN_L BIT(22)
|
||||||
static const u32 JC_BTN_ZL = BIT(23);
|
#define JC_BTN_ZL BIT(23)
|
||||||
|
|
||||||
enum joycon_msg_type {
|
enum joycon_msg_type {
|
||||||
JOYCON_MSG_TYPE_NONE,
|
JOYCON_MSG_TYPE_NONE,
|
||||||
|
Loading…
Reference in New Issue
Block a user