Dan Carpenter [Wed, 29 Jun 2011 19:50:48 +0000 (22:50 +0300)]
Staging: iio: some uninitialized variable bugs
There were some uninitialized variable warnings in iio. Two of
these came from the recent changes to how the private data was
allocated in 83f0422dc6a16 "staging:iio:accel:sca3000: allocate
state in iio_dev and use iio_priv to access."
drivers/staging/iio/accel/sca3000_core.c: In function 'sca3000_probe':
drivers/staging/iio/accel/sca3000_core.c:1137:9: warning: 'st' may be used uninitialized in this function
drivers/staging/iio/adc/ad7291.c: In function 'ad7291_probe':
drivers/staging/iio/adc/ad7291.c:805:15: warning: 'chip' may be used uninitialized in this function
drivers/staging/iio/dac/ad5624r_spi.c: In function 'ad5624r_probe':
drivers/staging/iio/dac/ad5624r_spi.c:228:24: warning: 'st' may be used uninitialized in this function
Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linus Walleij [Thu, 30 Jun 2011 06:31:59 +0000 (08:31 +0200)]
staging: ste_rmi4: remove cross-dependent platform data
The ux500 machine was actually defining platform data for the
staging driver ste_rmi4, which is not OK. Let us instead define
some __weak platform data in the machine so that the staging
driver can override it at compile-time and we can thus have the
driver self-contained in staging.
Reported-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tobias Klauser [Fri, 24 Jun 2011 13:48:47 +0000 (15:48 +0200)]
Staging: usbip: vhci-hcd: Do not kill already dead RX/TX kthread
When unbinding a device on the host which was still attached on the
client, I got a NULL pointer dereference on the client. This turned out
to be due to kthread_stop() being called on an already dead kthread.
Delay the printing of the output header until the list is received
from the remote host. This allows notification that the host does not
have any exportable devices.
Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
matt mooney [Mon, 20 Jun 2011 05:44:43 +0000 (22:44 -0700)]
staging: usbip: userspace: usbip_unbind.c: implement using libsysfs
Modify unbind to use libsysfs, and include a check to verify that the
device is actually using usbip-host before proceeding. The output
messages have been changed to be consistent with `usbip bind'.
Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
matt mooney [Mon, 20 Jun 2011 05:44:42 +0000 (22:44 -0700)]
staging: usbip: userspace: usbip_bind.c: major rewrite of the implementation
Rewrite functions in terms of libsysfs, which eliminates a lot of
helper functions simplifying the file layout. Now, the two processes
taking place here, an unbind of the old driver and a bind of
usbip-host, are single functions and have been renamed along with the
controlling function. A check to see if the device is already bound to
usbip-host is now included.
Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
matt mooney [Mon, 20 Jun 2011 05:44:38 +0000 (22:44 -0700)]
staging: usbip: userspace: libsrc: change all output messages to debug
The library should not be displaying random messages intermixed with
those from the programs that use them. So, instead, change all of the
output from the library to debug only, and allow the programs to
decide what to tell the user. This also changes the messages to use
the same form, which makes understanding them easier.
Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
matt mooney [Mon, 20 Jun 2011 05:44:37 +0000 (22:44 -0700)]
staging: usbip: userspace: libsrc: remove usbip.h
Remove the library version of usbip.h because its sole purpose was to
include other headers, which is bad practice. Also modify include
guards for consistency.
Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Larry Finger [Fri, 24 Jun 2011 22:03:12 +0000 (17:03 -0500)]
staging: rtl8192u: Fix big-endian warning
When compiling the rtl8192u driver from staging on a big-endian
architecture, the following warning results:
CC [M] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.o
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c: In function 'ieee80211_probe_resp':
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:780: warning: value computed is not used
The warning is due to misuse of cpu_to_le16().
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Larry Finger [Fri, 24 Jun 2011 22:02:54 +0000 (17:02 -0500)]
staging: rtl8192e: Fix big-endian warning
When compiling the rtl8192e driver from staging on a big-endian
architecture, the following warning results:
CC [M] drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.o
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c: In function 'ieee80211_probe_resp':
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c:781: warning: value computed is not used
The warning is due to misuse of cpu_to_le16().
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Larry Finger [Fri, 24 Jun 2011 22:02:27 +0000 (17:02 -0500)]
staging: rtl8187se: Fix big-endian warning
When compiling the rtl8187se driver from staging on a big-endian
architecture, the following warning results:
CC [M] drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.o
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c: In function 'ieee80211_probe_resp':
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:824: warning: value computed is not used
The warning is due to misuse of cpu_to_le16().
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
matt mooney [Thu, 16 Jun 2011 09:24:57 +0000 (02:24 -0700)]
staging: usbip: userspace: remove usb.ids file
Inclusion of the usb.ids file is redundant. USBIDS_DIR is set in
configure.ac to a default of /usr/share/hwdata/. This can be
overridden using `./configure --with-usbids-dir=<dir>'.
Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Márton Németh [Tue, 14 Jun 2011 06:28:26 +0000 (08:28 +0200)]
usbip: dump the port status difference
At the beginning of vhci_hub_control() function the port
status is saved to show what are the differences between the
previous and the new status. Change the dump function to
really show the differences in the status bit changes: put
a '+' sign before the symbolic name of a bit where a bit
was set, a '-' sign where the bit was cleared and a SPACE
where the bit was not changed. This is similar to the way
"diff -u" shows the changes and easy to understand.
Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Márton Németh [Mon, 13 Jun 2011 21:47:39 +0000 (23:47 +0200)]
usbip: only dump valid port status
The wIndex parameter of vhci_hub_control() is always zero when the
request type is GetHubDescriptor, see drivers/usb/core/hub.c::get_hub_descriptor()
and Universal Serial Bus Specification revision 2.0 (April 27, 2000) Section
11.24.2.5 "Get Hub Descriptor". This means the variable rhport will not contain
any useful index. Only use valid rhport values.
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Sun, 3 Jul 2011 17:08:22 +0000 (18:08 +0100)]
staging: et131x: Fix stats->rx_packets accounting
The net_device_stats->rx_packets counter is not getting updated.
This is due to checking a fMP_ADAPTER_LINK_DETECTION flag prior to
updating which is never set.
Solved by using netif_carrier_ok() to test for a link, and removing
the fMP_ADAPTER_LINK_DETECTION flag, which looks to be a broken
mechanism.
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove several externs from dhd_linux.c
The script checkpatch.pl flagged for some extern variables in
dhd_linux.c source. Several have been fixed in this patch. Two
remaining are in macro conditional code that needs cleanup so
they are not resolved here.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 5 Jul 2011 22:02:47 +0000 (00:02 +0200)]
staging: brcm80211: deleted two fullmac source files
Having both a 'generic' as a 'linux' specific variant of a file makes
no sense in a Linux environment. Merged bcmsdh_sdmmc_linux.c into
bcmsdh_sdmmc.c, and bcmsdh_linux.c into bcmsdh.c.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: made name lookup arrays more const
The checkpatch script gave a hint that some character string arrays
probably should have an additional const keyword. This patch changes
the static const char * arrays to static const char * const arrays as
suggested getting rid of two checkpatch warnings.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The header file dhd_dbg.h contains several macros used throughout
the code starting with DHD_. These have been renamed to get rid
of this broadcom specific acronym.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tomas Winkler [Tue, 5 Jul 2011 18:07:47 +0000 (21:07 +0300)]
staging/easycap: kill telltale logic
This reason for this feature was
'some versions of the videodev module overwrite the data which has
been written by the call to usb_set_intfdata() in easycap_usb_probe(),
replacing it with a pointer to the embedded v4l2_device structure.
to detect this, the string in the easycap.telltale[] buffer is checked.'
The upstream version of v4l2_device_register sets driver data
only when it wasn't already set, therefore this is not needed
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: rename pointer conversion macros in wl_cfg80211.h
The data structures in fullmac driver references are made easier by
using provided macros in wl_cfg80211.h. The abbreviation 'wl' in these
macros has been replaced by cfg or the macro has been removed if used
only once.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 5 Jul 2011 20:06:08 +0000 (22:06 +0200)]
staging: brcm80211: fullmac register access macro's take u32 instead of pointers
Code cleanup. Fullmac contains macro's that access registers on the 32 bits
backplane bus. These registers should not be declared as pointers since
pointers can be 64 bits. The following patch series gets rid of these pointers
and ultimately of all compiler warning when compiling for amd64.
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: rename dhd_bus structure and functions
The header file dhd_bus.h contains several function prototypes
starting with dhd_bus_ and using parameter with struct dhd_bus.
These function and structure have been renamed to brcmf_bus.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jesper Juhl [Thu, 23 Jun 2011 22:40:01 +0000 (00:40 +0200)]
Remove unneeded version.h includes from drivers/staging/rtl*/
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/staging/rtl8187se/,
drivers/staging/rtl8192e/, drivers/staging/rtl8192u/ &
drivers/staging/rtl8712/.
This patch removes them.
Jesper Juhl [Thu, 23 Jun 2011 22:47:43 +0000 (00:47 +0200)]
Remove unneeded version.h include from drivers/staging/cxt1e1/sbecom_inline_linux.h
It was pointed out by 'make versioncheck' that include of
linux/version.h is not needed in
drivers/staging/cxt1e1/sbecom_inline_linux.h
This patch removes it.
Jesper Juhl [Thu, 23 Jun 2011 22:51:12 +0000 (00:51 +0200)]
Remove unneeded version.h includes (and add where needed) for drivers/staging/easycap/
It was pointed out by 'make versioncheck' that linux/version.h was not
always being included where needed and sometimes included needlessly
in drivers/staging/easycap/.
This patch fixes up the includes.