diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-12-18 09:17:16 -0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-01-07 11:13:17 -0800 |
commit | 287d19ce2e67c15e79a187b3bdcbbea1a0a51a7d (patch) | |
tree | 128d9c67557a4fe5e5e910b8ca2d50aedee31b7c /drivers/pci/pci.h | |
parent | 1120f8b8169fb2cb51219d326892d963e762edb6 (diff) |
PCI: revise VPD access interface
Change PCI VPD API which was only used by sysfs to something usable
in drivers.
* move iteration over multiple words to the low level
* use conventional types for arguments
* add exportable wrapper
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 65deed8bfc0..211fd418f48 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -56,14 +56,14 @@ extern int pci_user_write_config_word(struct pci_dev *dev, int where, u16 val); extern int pci_user_write_config_dword(struct pci_dev *dev, int where, u32 val); struct pci_vpd_ops { - int (*read)(struct pci_dev *dev, int pos, int size, char *buf); - int (*write)(struct pci_dev *dev, int pos, int size, const char *buf); + ssize_t (*read)(struct pci_dev *dev, loff_t pos, size_t count, void *buf); + ssize_t (*write)(struct pci_dev *dev, loff_t pos, size_t count, const void *buf); void (*release)(struct pci_dev *dev); }; struct pci_vpd { unsigned int len; - struct pci_vpd_ops *ops; + const struct pci_vpd_ops *ops; struct bin_attribute *attr; /* descriptor for sysfs VPD entry */ }; |