Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242602
b: refs/heads/master
c: bbfa306
h: refs/heads/master
v: v3
  • Loading branch information
Naga Chumbalkar authored and Jesse Barnes committed Mar 21, 2011
1 parent 279c998 commit 48b74a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a680b7c325882188865f05b9a88d32f75f26495
refs/heads/master: bbfa306a1e5d9618231aa0de3d52a8eb1219d0c3
4 changes: 4 additions & 0 deletions trunk/drivers/pci/pcie/aspm.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,8 @@ static int pcie_aspm_set_policy(const char *val, struct kernel_param *kp)
int i;
struct pcie_link_state *link;

if (aspm_disabled)
return -EPERM;
for (i = 0; i < ARRAY_SIZE(policy_str); i++)
if (!strncmp(val, policy_str[i], strlen(policy_str[i])))
break;
Expand Down Expand Up @@ -824,6 +826,8 @@ static ssize_t link_state_store(struct device *dev,
struct pcie_link_state *link, *root = pdev->link_state->root;
u32 val = buf[0] - '0', state = 0;

if (aspm_disabled)
return -EPERM;
if (n < 1 || val > 3)
return -EINVAL;

Expand Down

0 comments on commit 48b74a8

Please sign in to comment.