1. 30 Oct, 2012 29 commits
  2. 29 Oct, 2012 11 commits
    • Ian Abbott's avatar
      staging: comedi: amplc_pci230: use auto_attach() hook · 1ed1b3df
      Ian Abbott authored
      Use the new `auto_attach()` hook in the `struct comedi_driver` instead
      of the old `attach_pci()` hook.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1ed1b3df
    • Ian Abbott's avatar
      staging: comedi: vmk80xx: use auto_attach() hook · 392ba7bc
      Ian Abbott authored
      Use the new `auto_attach()` hook in the `struct comedi_driver` instead
      of the old `attach_usb()` hook.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      392ba7bc
    • Ian Abbott's avatar
      staging: comedi: add comedi to usb interface helper · 0a577b82
      Ian Abbott authored
      Add inline helper function `comedi_to_usb_interface()` to get the
      pointer to `struct usb_interface` associated with the comedi device.
      This pointer is set by the call to `comedi_usb_auto_config()`.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0a577b82
    • Ian Abbott's avatar
      staging: comedi: support auto_attach() for PCI and USB · d5121914
      Ian Abbott authored
      Allow `comedi_pci_auto_config()` and `comedi_usb_auto_config()` to use
      the new `auto_attach()` hook in the low-level driver's `struct
      comedi_driver` if it is set and the `attach_pci()` or `attach_usb()`
      hook (for PCI or USB respectively) is `NULL`.
      
      Eventually, the `auto_attach()` hook will be the only way of
      auto-configuring hardware devices as comedi devices and the bus-type
      specific `attach_pci()` and `attach_usb()` hooks will be removed.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d5121914
    • Ian Abbott's avatar
      staging: comedi: add generic auto-config functions · 8ed705af
      Ian Abbott authored
      Add (and export) generic auto-config function `comedi_auto_config()` to
      allow hardware devices on arbitrary bus types (e.g. platform devices,
      spi devices, etc.) to be auto-configured as comedi devices.  This uses a
      new `auto_attach()` hook in the `struct comedi_driver`.  This new hook
      will eventually replace the bus-specific `attach_pci()` and
      `attach_usb()` hooks in the low-level comedi drivers.
      
      When the `auto_attach()` hook is called in the low-level driver, the
      `hw_dev` member of the `struct comedi_device` will have already been set
      to the hardware device passed to `comedi_auto_config()`.  The low-level
      driver can convert this to some bus-device wrapper structure pointer,
      possibly with the help of the `context` parameter that is passed
      unchanged from the `comedi_auto_config()` call.
      
      Also export the existing `comedi_auto_unconfig()` function as the
      matching call to `comedi_auto_config()`.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8ed705af
    • Ian Abbott's avatar
      staging: comedi: rename old auto-config functions · 156096a0
      Ian Abbott authored
      Rename `comedi_auto_config()` to `comedi_old_auto_config()`, and
      `comedi_auto_config_wrapper()` to `comedi_old_auto_config_wrapper()`.
      These functions are deprecated and will be removed once the few
      remaining low-level comedi drivers that use them have been updated.
      (The low-level drivers in question support auto-configuration of
      detected comedi devices, but still use the `attach()` hook in their
      `struct comedi_driver` to do so.)
      
      This internal change frees up the name `comedi_auto_config` for future
      use.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      156096a0
    • Ian Abbott's avatar
      staging: comedi: change type of auto-config context · f9c3e4e7
      Ian Abbott authored
      Change the type of the context parameter passed to
      `comedi_auto_config_helper()` from `void *` to `unsigned long`.  It's
      currently just an internal change and all current internal usages pass
      pointers in the context, but future uses of this function may pass
      integer values or pointer values at the whim of a lower-level comedi
      driver and the `unsigned long` type expresses this better as it is
      commonly used in the Linux kernel to hold such values.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f9c3e4e7
    • Chad Williamson's avatar
      Staging: silicom: remove code requiring an old LINUX_VERSION_CODE · 3e4cce9d
      Chad Williamson authored
      Remove all code and associated preprocessor logic dependent on an old
      LINUX_VERSION_CODE since such code is dead for an in-kernel driver.
      Signed-off-by: default avatarChad Williamson <chad@dahc.us>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3e4cce9d
    • Yuanhan Liu's avatar
      staging: dgrp: fix potential NULL defereference issue · 7defac36
      Yuanhan Liu authored
      Fix a coccinelle warning catched by Fengguang's 0-DAY system:
      + drivers/staging/dgrp/dgrp_net_ops.c:1061:11-27: ERROR: nd is NULL but dereferenced.
      
      Put the "done:" label a bit down would solve this issue.
      
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Julia Lawall <julia.lawall@lip6.fr>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarYuanhan Liu <yuanhan.liu@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7defac36
    • Peter Huewe's avatar
      staging/rtl8187se: Fix compile warning 'is static but declared in .. which is not static' · f71ccaa4
      Peter Huewe authored
      When compiling this driver I get these compile warnings:
      
      ieee80211.h:1227:2: warning: '______f' is static but declared in inline
      function 'ieee80211_is_empty_essid' which is not static [enabled by
      default]
      ieee80211.h:1233:3: warning: '______f' is static but declared in inline
      function 'ieee80211_is_empty_essid' which is not static [enabled by
      default]
      ieee80211.h:1248:2: warning: '______f' is static but declared in inline
      function 'ieee80211_is_valid_mode' which is not static [enabled by
      default]
      ieee80211.h:1253:2: warning: '______f' is static but declared in inline
      function 'ieee80211_is_valid_mode' which is not static [enabled by
      default]
      ieee80211.h:1258:2: warning: '______f' is static but declared in inline
      function 'ieee80211_is_valid_mode' which is not static [enabled by
      default]
      ieee80211.h:1272:3: warning: '______f' is static but declared in inline
      function 'ieee80211_get_hdrlen' which is not static [enabled by default]
      ieee80211.h:1274:3: warning: '______f' is static but declared in inline
      function 'ieee80211_get_hdrlen' which is not static [enabled by default]
      
      These functions are declared as extern inline but not 'overloaded'
      anywhere so we can declare them static inline and get rid of the
      warnings.
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f71ccaa4
    • Peter Huewe's avatar
      staging/rtl8192e: Fix compile warning 'is static but declared in .. which is not static' · 9d8a20a5
      Peter Huewe authored
      When compiling this driver I get these compile warnings:
      
      rtllib.h:2573:2: warning: '______f' is static but declared in inline
      function 'rtllib_is_empty_essid' which is not static [enabled by
      default]
      rtllib.h:2579:3: warning: '______f' is static but declared in inline
      function 'rtllib_is_empty_essid' which is not static [enabled by
      default]
      rtllib.h:2594:2: warning: '______f' is static but declared in inline
      function 'rtllib_is_valid_mode' which is not static [enabled by default]
      rtllib.h:2599:2: warning: '______f' is static but declared in inline
      function 'rtllib_is_valid_mode' which is not static [enabled by default]
      rtllib.h:2604:2: warning: '______f' is static but declared in inline
      function 'rtllib_is_valid_mode' which is not static [enabled by default]
      rtllib.h:2618:3: warning: '______f' is static but declared in inline
      function 'rtllib_get_hdrlen' which is not static [enabled by default]
      rtllib.h:2620:3: warning: '______f' is static but declared in inline
      function 'rtllib_get_hdrlen' which is not static [enabled by default]
      
      These functions are declared as extern inline but not 'overloaded'
      anywhere so we can declare them static inline and get rid of the
      warnings.
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9d8a20a5