Skip to content

Commit

Permalink
Update PCIe driver to support newer kernel & udev versions
Browse files Browse the repository at this point in the history
  • Loading branch information
abyszuk committed Apr 15, 2013
1 parent 469a25a commit 697fb43
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/pcie/etc/udev/rules.d/60-udev_fpga.rules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Permissions for the fpga devices

KERNEL="fpga*", OWNER="root", GROUP="users", MODE="660"
KERNEL=="fpga*", OWNER="root", GROUP="users", MODE="660"
4 changes: 2 additions & 2 deletions drivers/pcie/src/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ static struct pci_driver pcidriver_driver = {
* @param pdev Pointer to the PCI device
*
*/
static int __devinit pcidriver_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static int pcidriver_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
int err;
int devno;
Expand Down Expand Up @@ -424,7 +424,7 @@ static int __devinit pcidriver_probe(struct pci_dev *pdev, const struct pci_devi
* This function is called when disconnecting a device
*
*/
static void __devexit pcidriver_remove(struct pci_dev *pdev)
static void pcidriver_remove(struct pci_dev *pdev)
{
pcidriver_privdata_t *privdata;

Expand Down
6 changes: 2 additions & 4 deletions drivers/pcie/src/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ int pcidriver_release(struct inode *inode, struct file *filp);

/* prototypes for device operations */
static struct pci_driver pcidriver_driver;
static int __devinit pcidriver_probe(struct pci_dev *pdev, const struct pci_device_id *id);
static void __devexit pcidriver_remove(struct pci_dev *pdev);


static int pcidriver_probe(struct pci_dev *pdev, const struct pci_device_id *id);
static void pcidriver_remove(struct pci_dev *pdev);

/* prototypes for module operations */
static int __init pcidriver_init(void);
Expand Down
4 changes: 4 additions & 0 deletions drivers/pcie/src/kmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#include "kmem.h" /* prototypes for kernel memory */
#include "sysfs.h" /* prototypes for sysfs */

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
#define VM_RESERVED (VM_DONTEXPAND | VM_DONTDUMP)
#endif

/**
*
* Allocates new kernel memory including the corresponding management structure, makes
Expand Down

0 comments on commit 697fb43

Please sign in to comment.