]> err.no Git - linux-2.6/blobdiff - drivers/pci/pci.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
[linux-2.6] / drivers / pci / pci.h
index eabeb1f2ec998b0cf39de823b7c0bfd7a237b6ba..00408c97e5fc8cc2e38f52b408c70fdab9d133a8 100644 (file)
@@ -18,6 +18,25 @@ extern int pci_user_write_config_byte(struct pci_dev *dev, int where, u8 val);
 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);
+       void (*release)(struct pci_dev *dev);
+};
+
+struct pci_vpd {
+       unsigned int len;
+       struct pci_vpd_ops *ops;
+       struct bin_attribute *attr; /* descriptor for sysfs VPD entry */
+};
+
+extern int pci_vpd_pci22_init(struct pci_dev *dev);
+static inline void pci_vpd_release(struct pci_dev *dev)
+{
+       if (dev->vpd)
+               dev->vpd->ops->release(dev);
+}
+
 /* PCI /proc functions */
 #ifdef CONFIG_PROC_FS
 extern int pci_proc_attach_device(struct pci_dev *dev);