diff options
author | Doug Thompson <dougthompson@xmission.com> | 2007-07-19 04:50:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:57 -0400 |
commit | d45e7823baf655ced91c7987fb4ba9aae990ad6d (patch) | |
tree | 5a81af139f2e9ea6cd4e9d5cfa7fa9233b2f39c9 /drivers/edac/edac_core.h | |
parent | b8f6f9755248026f21282e25cac49a1af698056c (diff) |
drivers/edac: fix edac_device init apis
Refactoring of sysfs code necessitated the refactoring of the
edac_device_alloc() and edac_device_add_device() apis, of moving the index
value to the alloc() function. This patch alters the in tree drivers to
utilize this new api signature.
Having the index value performed later created a chicken-and-the-egg issue.
Moving it to the alloc() function allows for creating the necessary sysfs
entries with the proper index number
Cc: Alan Cox alan@lxorguk.ukuu.org.uk
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac/edac_core.h')
-rw-r--r-- | drivers/edac/edac_core.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h index 63691cf3a1d6..2c399c52193e 100644 --- a/drivers/edac/edac_core.h +++ b/drivers/edac/edac_core.h | |||
@@ -634,7 +634,8 @@ extern struct edac_device_ctl_info *edac_device_alloc_ctl_info( | |||
634 | char *edac_block_name, unsigned nr_blocks, | 634 | char *edac_block_name, unsigned nr_blocks, |
635 | unsigned offset_value, | 635 | unsigned offset_value, |
636 | struct edac_dev_sysfs_block_attribute *block_attributes, | 636 | struct edac_dev_sysfs_block_attribute *block_attributes, |
637 | unsigned nr_attribs); | 637 | unsigned nr_attribs, |
638 | int device_index); | ||
638 | 639 | ||
639 | /* The offset value can be: | 640 | /* The offset value can be: |
640 | * -1 indicating no offset value | 641 | * -1 indicating no offset value |
@@ -806,8 +807,7 @@ extern void edac_mc_handle_fbd_ce(struct mem_ctl_info *mci, unsigned int csrow, | |||
806 | /* | 807 | /* |
807 | * edac_device APIs | 808 | * edac_device APIs |
808 | */ | 809 | */ |
809 | extern int edac_device_add_device(struct edac_device_ctl_info *edac_dev, | 810 | extern int edac_device_add_device(struct edac_device_ctl_info *edac_dev); |
810 | int dev_idx); | ||
811 | extern struct edac_device_ctl_info *edac_device_del_device(struct device *dev); | 811 | extern struct edac_device_ctl_info *edac_device_del_device(struct device *dev); |
812 | extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev, | 812 | extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev, |
813 | int inst_nr, int block_nr, const char *msg); | 813 | int inst_nr, int block_nr, const char *msg); |