Skip to content

Commit

Permalink
ata_piix: remove open-coded dmi_match(DMI_OEM_STRING)
Browse files Browse the repository at this point in the history
Since de40614 ("firmware: dmi_scan: Add DMI_OEM_STRING support to
dmi_matches") dmi_check_system() can match OEM_STRINGs itself.
Use the feature.

Signed-off-by: Michał Mirosław <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
osctobe authored and axboe committed Nov 7, 2019
1 parent e9f691d commit dee58fe
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,12 @@ static int piix_broken_suspend(void)
DMI_MATCH(DMI_PRODUCT_NAME, "Tecra M3"),
},
},
{
.ident = "TECRA M3",
.matches = {
DMI_MATCH(DMI_OEM_STRING, "Tecra M3,"),
},
},
{
.ident = "TECRA M4",
.matches = {
Expand Down Expand Up @@ -955,18 +961,10 @@ static int piix_broken_suspend(void)

{ } /* terminate list */
};
static const char *oemstrs[] = {
"Tecra M3,",
};
int i;

if (dmi_check_system(sysids))
return 1;

for (i = 0; i < ARRAY_SIZE(oemstrs); i++)
if (dmi_find_device(DMI_DEV_TYPE_OEM_STRING, oemstrs[i], NULL))
return 1;

/* TECRA M4 sometimes forgets its identify and reports bogus
* DMI information. As the bogus information is a bit
* generic, match as many entries as possible. This manual
Expand Down

0 comments on commit dee58fe

Please sign in to comment.