On Thu, 19 Dec 2024, Jackie Dong wrote:
+};
+
static int ideapad_input_init(struct ideapad_private *priv)
{
struct input_dev *inputdev;
@@ -2023,15 +2033,145 @@ static void ideapad_check_features(struct ideapad_private *priv)
/*
* WMI driver
*/
+#define IDEAPAD_ACPI_LED_MAX (((SNDRV_CTL_ELEM_ACCESS_MIC_LED -\
+ SNDRV_CTL_ELEM_ACCESS_SPK_LED) >> SNDRV_CTL_ELEM_ACCESS_LED_SHIFT) + 1)
Hmm, so you fix the math bug (2-1 is not 2 but 1) with that +1 in the end?
I think you would want something like this here (but I'm not entirely
sure at this point of reading your change):
FIELD_GET(SNDRV_CTL_ELEM_ACCESS_MIC_LED, SNDRV_CTL_ELEM_ACCESS_MIC_LED)
(Remember to make sure you've include for FIELD_GET if that's the correct
way to go here).