Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139719
b: refs/heads/master
c: 8641a38
h: refs/heads/master
i:
  139717: 04e2152
  139715: 459661d
  139711: bfbdd06
v: v3
  • Loading branch information
Harry Ciao authored and Linus Torvalds committed Apr 3, 2009
1 parent 07ee00f commit 60ad9d9
Show file tree
Hide file tree
Showing 3 changed files with 16 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: 697dab6484fad0e636b0677c010b15cc449d1b9b
refs/heads/master: 8641a3845d066f841ca591ac1c480b13bea7d849
1 change: 1 addition & 0 deletions trunk/drivers/edac/edac_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@ extern void edac_pci_free_ctl_info(struct edac_pci_ctl_info *pci);
extern void edac_pci_reset_delay_period(struct edac_pci_ctl_info *pci,
unsigned long value);

extern int edac_pci_alloc_index(void);
extern int edac_pci_add_device(struct edac_pci_ctl_info *pci, int edac_idx);
extern struct edac_pci_ctl_info *edac_pci_del_device(struct device *dev);

Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/edac/edac_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

static DEFINE_MUTEX(edac_pci_ctls_mutex);
static LIST_HEAD(edac_pci_list);
static atomic_t pci_indexes = ATOMIC_INIT(0);

/*
* edac_pci_alloc_ctl_info
Expand Down Expand Up @@ -317,6 +318,19 @@ void edac_pci_reset_delay_period(struct edac_pci_ctl_info *pci,
}
EXPORT_SYMBOL_GPL(edac_pci_reset_delay_period);

/*
* edac_pci_alloc_index: Allocate a unique PCI index number
*
* Return:
* allocated index number
*
*/
int edac_pci_alloc_index(void)
{
return atomic_inc_return(&pci_indexes) - 1;
}
EXPORT_SYMBOL_GPL(edac_pci_alloc_index);

/*
* edac_pci_add_device: Insert the 'edac_dev' structure into the
* edac_pci global list and create sysfs entries associated with
Expand Down

0 comments on commit 60ad9d9

Please sign in to comment.