RE: [PATCH][v2] ACPI: Do not report _OSI("Darwin") when acpi_osi=!Darwin provided

From: Chen, Yu C
Date: Mon Feb 01 2016 - 09:00:25 EST


> -----Original Message-----
> From: Andy Shevchenko [mailto:andy.shevchenko@xxxxxxxxx]
> Sent: Monday, February 01, 2016 5:31 PM
> To: Chen, Yu C
> Cc: linux-acpi@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Rafael J.
> Wysocki; Len Brown; matthew.garrett@xxxxxxxxxx; Zhang, Rui
> Subject: Re: [PATCH][v2] ACPI: Do not report _OSI("Darwin") when
> acpi_osi=!Darwin provided
>
> On Mon, Feb 1, 2016 at 11:13 AM, Chen, Yu C <yu.c.chen@xxxxxxxxx> wrote:
>
> >> > +static bool acpi_osi_setup_disabled(char *str) {
> >> > + int i;
> >> > + struct osi_setup_entry *osi;
> >> > +
> >> > + if (!str)
> >> > + return false;
> >> > +
> >> > + for (i = 0; i < OSI_STRING_ENTRIES_MAX; i++) {
> >> > + osi = &osi_setup_entries[i];
> >> > + if (!strcmp(osi->string, str)) {
> >>
> >> Seems like we have one more user for
> >> http://www.spinics.net/lists/kernel/msg2157535.html
> > [Yu] This is nice, I can convert this patch to use match_string, and
> > may I add my patch into your patchset? I saw there are some
> > modifications on drivers in your patchset above.
>
> Actually it will not help in this case. Sorry.
Ah, osi_setup_entries is a array of structure rather than string.