Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323134
b: refs/heads/master
c: 5f0ecb9
h: refs/heads/master
v: v3
  • Loading branch information
Andreas Herrmann authored and Jean Delvare committed Sep 23, 2012
1 parent bb001c6 commit 3b43fed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 641f14560035bbb86500ea4b3a27ad27f034725b
refs/heads/master: 5f0ecb907deb1e6f28071ee3bd568903b9da1be4
15 changes: 13 additions & 2 deletions trunk/drivers/hwmon/fam15h_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ static bool __devinit fam15h_power_is_internal_node0(struct pci_dev *f4)
* counter saturations resulting in bogus power readings.
* We correct this value ourselves to cope with older BIOSes.
*/
static DEFINE_PCI_DEVICE_TABLE(affected_device) = {
static const struct pci_device_id affected_device[] = {
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
{ 0 }
};

static void __devinit tweak_runavg_range(struct pci_dev *pdev)
static void tweak_runavg_range(struct pci_dev *pdev)
{
u32 val;

Expand All @@ -158,6 +158,16 @@ static void __devinit tweak_runavg_range(struct pci_dev *pdev)
REG_TDP_RUNNING_AVERAGE, val);
}

#ifdef CONFIG_PM
static int fam15h_power_resume(struct pci_dev *pdev)
{
tweak_runavg_range(pdev);
return 0;
}
#else
#define fam15h_power_resume NULL
#endif

static void __devinit fam15h_power_init_data(struct pci_dev *f4,
struct fam15h_power_data *data)
{
Expand Down Expand Up @@ -256,6 +266,7 @@ static struct pci_driver fam15h_power_driver = {
.id_table = fam15h_power_id_table,
.probe = fam15h_power_probe,
.remove = __devexit_p(fam15h_power_remove),
.resume = fam15h_power_resume,
};

module_pci_driver(fam15h_power_driver);

0 comments on commit 3b43fed

Please sign in to comment.