]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cpupower: fix breakage from libpci API change
authorLucas Stach <dev@lynxeye.de>
Mon, 13 Apr 2015 20:24:01 +0000 (22:24 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 15 Apr 2015 19:54:26 +0000 (21:54 +0200)
commit06b230e3dd46e3e45fb57990b09007c7cd071515
tree2c26c2e194ce2ea7ccf384e1056372bcef53c315
parent39a8804455fb23f09157341d3ba7db6d7ae6ee76
cpupower: fix breakage from libpci API change

libpci 3.3.0 introduced an additional member in the pci_filter struct
which needs to be initialized to -1 to get the same behavior as before
the API change. The libpci internal helpers got updated accordingly,
but as the cpupower pci helpers initialized the struct themselves the
behavior changed.

Use the libpci helper pci_filter_init() to fix this and guard against
similar breakages in the future.

This fixes probing of the AMD fam12h/14h cpuidle monitor on systems
with libpci >= 3.3.0.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
tools/power/cpupower/utils/helpers/pci.c