mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
dmi: Let dmi_walk() users pass private data
At the moment, dmi_walk() lacks flexibility, users can't pass data to the callback function. Add a pointer for private data to make this function more flexible. Signed-off-by: Jean Delvare <[email protected]> Cc: Hans de Goede <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Roland Dreier <[email protected]>
This commit is contained in:
parent
ec19920944
commit
e7a19c5624
5 changed files with 21 additions and 16 deletions
|
|
@ -856,7 +856,7 @@ static struct file_operations watchdog_fops = {
|
|||
|
||||
/* DMI decode routine to read voltage scaling factors from special DMI tables,
|
||||
which are available on FSC machines with an fscher or later chip. */
|
||||
static void fschmd_dmi_decode(const struct dmi_header *header)
|
||||
static void fschmd_dmi_decode(const struct dmi_header *header, void *dummy)
|
||||
{
|
||||
int i, mult[3] = { 0 }, offset[3] = { 0 }, vref = 0, found = 0;
|
||||
|
||||
|
|
@ -991,7 +991,7 @@ static int fschmd_probe(struct i2c_client *client,
|
|||
|
||||
/* Read the special DMI table for fscher and newer chips */
|
||||
if ((kind == fscher || kind >= fschrc) && dmi_vref == -1) {
|
||||
dmi_walk(fschmd_dmi_decode);
|
||||
dmi_walk(fschmd_dmi_decode, NULL);
|
||||
if (dmi_vref == -1) {
|
||||
dev_warn(&client->dev,
|
||||
"Couldn't get voltage scaling factors from "
|
||||
|
|
|
|||
Loading…
Reference in a new issue