[PATCH] staging: gdm724x: Remove tests of KERNELVERSION

2013-08-25 Thread Larry Finger
Kernel code need not test for KERNELVERSION. Besides being unnecessary
for an in-kernel driver, these lines will cause a build failure for any
source tree with a stale include/linux/version.h.

This patch is only compile tested.

Signed-off-by: Larry Finger 
---
 drivers/staging/gdm724x/netlink_k.c | 13 -
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/gdm724x/netlink_k.c 
b/drivers/staging/gdm724x/netlink_k.c
index 90004a7..9e8be6a 100644
--- a/drivers/staging/gdm724x/netlink_k.c
+++ b/drivers/staging/gdm724x/netlink_k.c
@@ -91,24 +91,15 @@ struct sock *netlink_init(int unit,
void (*cb)(struct net_device *dev, u16 type, void *msg, int len))
 {
struct sock *sock;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
struct netlink_kernel_cfg cfg = {
.input  = netlink_rcv,
};
-#endif
 
 #if !defined(DEFINE_MUTEX)
init_MUTEX(&netlink_mutex);
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
-   sock = netlink_kernel_create(&init_net, unit, 0, netlink_rcv, NULL,
-   THIS_MODULE);
-#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0)
-   sock = netlink_kernel_create(&init_net, unit, THIS_MODULE, &cfg);
-#else
sock = netlink_kernel_create(&init_net, unit, &cfg);
-#endif
 
if (sock)
rcv_cb = cb;
@@ -142,11 +133,7 @@ int netlink_send(struct sock *sock, int group, u16 type, 
void *msg, int len)
 
nlh = nlmsg_put(skb, 0, seq, type, len, 0);
memcpy(NLMSG_DATA(nlh), msg, len);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0)
-   NETLINK_CB(skb).pid = 0;
-#else
NETLINK_CB(skb).portid = 0;
-#endif
NETLINK_CB(skb).dst_group = 0;
 
ret = netlink_broadcast(sock, skb, 0, group+1, GFP_ATOMIC);
-- 
1.8.1.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[GIT PATCH] Staging driver fixes for 3.11-rc7

2013-08-25 Thread Greg KH
The following changes since commit d4e4ab86bcba5a72779c43dc1459f71fea3d89c8:

  Linux 3.11-rc5 (2013-08-11 18:04:20 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ 
tags/staging-3.11-rc7

for you to fetch changes up to 3955dfa8216f712bc204a5ad2f4e51efff252fde:

  staging: comedi: bug-fix NULL pointer dereference on failed attach 
(2013-08-23 10:31:47 -0700)


Staging fixes for 3.11-rc7

Here are two tiny staging tree fixes (well, one is for an iio driver,
but those updates come through the staging tree due to dependancies.)

One fixes a problem with an IIO driver, and the other fixes a bug in the
comedi driver core.

Signed-off-by: Greg Kroah-Hartman 


Greg Kroah-Hartman (1):
  Merge tag 'iio-fixes-for-3.11c' of git://git.kernel.org/.../jic23/iio 
into staging-linus

Ian Abbott (1):
  staging: comedi: bug-fix NULL pointer dereference on failed attach

Peter Meerwald (1):
  iio: adjd_s311: Fix non-scan mode data read

 drivers/iio/light/adjd_s311.c| 3 ++-
 drivers/staging/comedi/drivers.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8192e: Remove pt_regs * irq handler parameter

2013-08-25 Thread navin patidar
struct pt_regs pointer is no longer passed as a irq handler
argument. and also remove unnecessary macros.

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c |5 +++--
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h |6 --
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c 
b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 2b6c61c..d952a34 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -94,6 +94,7 @@ MODULE_DEVICE_TABLE(pci, rtl8192_pci_id_tbl);
 static int rtl8192_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *id);
 static void rtl8192_pci_disconnect(struct pci_dev *pdev);
+static irqreturn_t rtl8192_interrupt(int irq, void *netdev);
 
 static struct pci_driver rtl8192_pci_driver = {
.name = DRV_NAME,   /* Driver name   */
@@ -1324,7 +1325,7 @@ static short rtl8192_init(struct net_device *dev)
(unsigned long)dev);
 
rtl8192_irq_disable(dev);
-   if (request_irq(dev->irq, (void *)rtl8192_interrupt_rsl, IRQF_SHARED,
+   if (request_irq(dev->irq, rtl8192_interrupt, IRQF_SHARED,
dev->name, dev)) {
printk(KERN_ERR "Error allocating IRQ %d", dev->irq);
return -1;
@@ -2704,7 +2705,7 @@ out:
 }
 
 
-irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs)
+irqreturn_t rtl8192_interrupt(int irq, void *netdev)
 {
struct net_device *dev = (struct net_device *) netdev;
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h 
b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 87d4d34..9d7cb0e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -88,10 +88,6 @@
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID , \
.driver_data = (kernel_ulong_t)&(cfg)
 
-#define irqreturn_type irqreturn_t
-
-#define rtl8192_interrupt(x, y, z) rtl8192_interrupt_rsl(x, y)
-
 #define RTL_MAX_SCAN_SIZE 128
 
 #define RTL_RATE_MAX   30
@@ -1044,8 +1040,6 @@ void rtl8192_set_chan(struct net_device *dev, short ch);
 void check_rfctrl_gpio_timer(unsigned long data);
 
 void rtl8192_hw_wakeup_wq(void *data);
-irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs);
-
 short rtl8192_pci_initdescring(struct net_device *dev);
 
 void rtl8192_cancel_deferred_work(struct r8192_priv *priv);
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: dgnc: Kconfig: add dependency PCI for it

2013-08-25 Thread Chen Gang
DGNC is based on PCI, so need add related dependency, or when compiled
with PCI disabled, it will be fail.

The related error (randconfig for PCI disabled under s390):

  drivers/staging/dgnc/dgnc_cls.c:1394:2: error: implicit declaration of 
function ‘ioremap’ [-Werror=implicit-function-declaration]
  drivers/staging/dgnc/dgnc_cls.c:1407:3: error: implicit declaration of 
function ‘iounmap’ [-Werror=implicit-function-declaration]


Signed-off-by: Chen Gang 
---
 drivers/staging/dgnc/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/dgnc/Kconfig b/drivers/staging/dgnc/Kconfig
index 23daaa5..032c2a7 100644
--- a/drivers/staging/dgnc/Kconfig
+++ b/drivers/staging/dgnc/Kconfig
@@ -1,6 +1,6 @@
 config DGNC
tristate "Digi Neo and Classic PCI Products"
default n
-   depends on TTY
+   depends on TTY && PCI
---help---
Driver for the Digi International Neo and Classic PCI based product 
line.
-- 
1.7.7.6
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] vme: vme_ca91cx42.c: fix to pass correct device identity to free_irq()

2013-08-25 Thread Wei Yongjun
From: Wei Yongjun 

free_irq() expects the same device identity that was passed to
corresponding request_irq(), otherwise the IRQ is not freed.

Signed-off-by: Wei Yongjun 
---
 drivers/vme/bridges/vme_ca91cx42.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/vme/bridges/vme_ca91cx42.c 
b/drivers/vme/bridges/vme_ca91cx42.c
index 64bfea3..f24e234 100644
--- a/drivers/vme/bridges/vme_ca91cx42.c
+++ b/drivers/vme/bridges/vme_ca91cx42.c
@@ -243,6 +243,8 @@ static int ca91cx42_irq_init(struct vme_bridge 
*ca91cx42_bridge)
 static void ca91cx42_irq_exit(struct ca91cx42_driver *bridge,
struct pci_dev *pdev)
 {
+   struct vme_bridge *ca91cx42_bridge;
+
/* Disable interrupts from PCI to VME */
iowrite32(0, bridge->base + VINT_EN);
 
@@ -251,7 +253,9 @@ static void ca91cx42_irq_exit(struct ca91cx42_driver 
*bridge,
/* Clear Any Pending PCI Interrupts */
iowrite32(0x00FF, bridge->base + LINT_STAT);
 
-   free_irq(pdev->irq, pdev);
+   ca91cx42_bridge = container_of((void *)bridge, struct vme_bridge,
+  driver_priv);
+   free_irq(pdev->irq, ca91cx42_bridge);
 }
 
 static int ca91cx42_iack_received(struct ca91cx42_driver *bridge, int level)

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel