aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-12-18 12:17:16 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 14:13:17 -0500
commit287d19ce2e67c15e79a187b3bdcbbea1a0a51a7d (patch)
tree128d9c67557a4fe5e5e910b8ca2d50aedee31b7c /drivers/pci/pci.h
parent1120f8b8169fb2cb51219d326892d963e762edb6 (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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 65deed8bfc06..211fd418f48f 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);
56extern int pci_user_write_config_dword(struct pci_dev *dev, int where, u32 val); 56extern int pci_user_write_config_dword(struct pci_dev *dev, int where, u32 val);
57 57
58struct pci_vpd_ops { 58struct pci_vpd_ops {
59 int (*read)(struct pci_dev *dev, int pos, int size, char *buf); 59 ssize_t (*read)(struct pci_dev *dev, loff_t pos, size_t count, void *buf);
60 int (*write)(struct pci_dev *dev, int pos, int size, const char *buf); 60 ssize_t (*write)(struct pci_dev *dev, loff_t pos, size_t count, const void *buf);
61 void (*release)(struct pci_dev *dev); 61 void (*release)(struct pci_dev *dev);
62}; 62};
63 63
64struct pci_vpd { 64struct pci_vpd {
65 unsigned int len; 65 unsigned int len;
66 struct pci_vpd_ops *ops; 66 const struct pci_vpd_ops *ops;
67 struct bin_attribute *attr; /* descriptor for sysfs VPD entry */ 67 struct bin_attribute *attr; /* descriptor for sysfs VPD entry */
68}; 68};
69 69