From 85ab9ee946da58f26d8a1d7b71664748bdc0f3b0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 7 Jun 2011 12:19:14 -0700 Subject: Staging: altera: move .h file to proper place Staging drivers should be self-contained, without files in the include/ directories. So move the altera.h file back to the driver directory for now, until it moves out of the staging tree. Cc: Igor M. Liplianin Cc: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/staging/altera-stapl/altera-jtag.c | 2 +- drivers/staging/altera-stapl/altera.c | 2 +- drivers/staging/altera-stapl/altera.h | 49 ++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 drivers/staging/altera-stapl/altera.h (limited to 'drivers') diff --git a/drivers/staging/altera-stapl/altera-jtag.c b/drivers/staging/altera-stapl/altera-jtag.c index 876308858b82..8b1620b1b2d0 100644 --- a/drivers/staging/altera-stapl/altera-jtag.c +++ b/drivers/staging/altera-stapl/altera-jtag.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include "altera.h" #include "altera-exprt.h" #include "altera-jtag.h" diff --git a/drivers/staging/altera-stapl/altera.c b/drivers/staging/altera-stapl/altera.c index 05aad351b120..9cd5e76880c0 100644 --- a/drivers/staging/altera-stapl/altera.c +++ b/drivers/staging/altera-stapl/altera.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include "altera.h" #include "altera-exprt.h" #include "altera-jtag.h" diff --git a/drivers/staging/altera-stapl/altera.h b/drivers/staging/altera-stapl/altera.h new file mode 100644 index 000000000000..94c0c6181daf --- /dev/null +++ b/drivers/staging/altera-stapl/altera.h @@ -0,0 +1,49 @@ +/* + * altera.h + * + * altera FPGA driver + * + * Copyright (C) Altera Corporation 1998-2001 + * Copyright (C) 2010 NetUP Inc. + * Copyright (C) 2010 Igor M. Liplianin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef _ALTERA_H_ +#define _ALTERA_H_ + +struct altera_config { + void *dev; + u8 *action; + int (*jtag_io) (void *dev, int tms, int tdi, int tdo); +}; + +#if defined(CONFIG_ALTERA_STAPL) || \ + (defined(CONFIG_ALTERA_STAPL_MODULE) && defined(MODULE)) + +extern int altera_init(struct altera_config *config, const struct firmware *fw); +#else + +static inline int altera_init(struct altera_config *config, + const struct firmware *fw) +{ + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); + return 0; +} +#endif /* CONFIG_ALTERA_STAPL */ + +#endif /* _ALTERA_H_ */ -- cgit v1.2.3 From fe35a59e16fbd426194d5d081d59aa18752d1f4d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 7 Jun 2011 12:23:57 -0700 Subject: Staging: remove STAGING_EXCLUDE_BUILD option Part of the requirement to be in the staging tree is that the code must build, so let's make it easier for people to build the code to test/prove this out. Based on a recommendation from Linus to implement this. Signed-off-by: Greg Kroah-Hartman --- drivers/staging/Kconfig | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index dfc16f955eb8..196284dc2f36 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -24,23 +24,6 @@ menuconfig STAGING if STAGING -config STAGING_EXCLUDE_BUILD - bool "Exclude Staging drivers from being built" if STAGING - default y - ---help--- - Are you sure you really want to build the staging drivers? - They taint your kernel, don't live up to the normal Linux - kernel quality standards, are a bit crufty around the edges, - and might go off and kick your dog when you aren't paying - attention. - - Say N here to be able to select and build the Staging drivers. - This option is primarily here to prevent them from being built - when selecting 'make allyesconfg' and 'make allmodconfig' so - don't be all that put off, your dog will be just fine. - -if !STAGING_EXCLUDE_BUILD - source "drivers/staging/tty/Kconfig" source "drivers/staging/generic_serial/Kconfig" @@ -177,5 +160,4 @@ source "drivers/staging/mei/Kconfig" source "drivers/staging/nvec/Kconfig" -endif # !STAGING_EXCLUDE_BUILD endif # STAGING -- cgit v1.2.3 From 91e623deccd5726ff97f1da6ac48dcc26048034a Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 25 May 2011 19:17:06 -0700 Subject: staging: fix olpc_dcon build, needs BACKLIGHT_CLASS_DEVICE Fix olpc_dcon.c build by selecting the needed kconfig symbol BACKLIGHT_CLASS_DEVICE. olpc_dcon.c:(.text+0x11588b): undefined reference to `backlight_device_register' Signed-off-by: Randy Dunlap Cc: Andres Salomon Cc: Chris Ball Cc: Jon Nettleton Signed-off-by: Greg Kroah-Hartman --- drivers/staging/olpc_dcon/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/staging/olpc_dcon/Kconfig b/drivers/staging/olpc_dcon/Kconfig index b05306766870..fe40e0b6f675 100644 --- a/drivers/staging/olpc_dcon/Kconfig +++ b/drivers/staging/olpc_dcon/Kconfig @@ -2,6 +2,7 @@ config FB_OLPC_DCON tristate "One Laptop Per Child Display CONtroller support" depends on OLPC && FB select I2C + select BACKLIGHT_CLASS_DEVICE ---help--- Add support for the OLPC XO DCON controller. This controller is only available on OLPC platforms. Unless you have one of these -- cgit v1.2.3 From e1c78de9a462f45dacdc8c27baf77aa680bcf8a4 Mon Sep 17 00:00:00 2001 From: Roland Vossen Date: Tue, 24 May 2011 13:35:21 +0200 Subject: staging: brcm80211: fix for 'multiple definition of wl_msg_level' build err Reported-by: Linus Torvalds Signed-off-by: Roland Vossen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/brcm80211/brcmfmac/wl_iw.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.c b/drivers/staging/brcm80211/brcmfmac/wl_iw.c index 929ceaf363be..15e1b05ca92d 100644 --- a/drivers/staging/brcm80211/brcmfmac/wl_iw.c +++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c @@ -64,8 +64,6 @@ wl_iw_extra_params_t g_wl_iw_params; extern bool wl_iw_conn_status_str(u32 event_type, u32 status, u32 reason, char *stringBuf, uint buflen); -uint wl_msg_level = WL_ERROR_VAL; - #define MAX_WLIW_IOCTL_LEN 1024 #ifdef CONFIG_WIRELESS_EXT -- cgit v1.2.3 From 827e4a07e8d0f6cf18e82988ae8daea3b5feab98 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 17 May 2011 15:15:19 -0700 Subject: staging: fix ath6kl build when CFG80211 is not enabled Fix build errors when CONFIG_CFG80211 is not enabled: drivers/built-in.o: In function `ar6k_cfg80211_deinit': (.text+0x189b71): undefined reference to `cfg80211_scan_done' drivers/built-in.o: In function `ar6k_cfg80211_deinit': (.text+0x189b86): undefined reference to `wiphy_unregister' drivers/built-in.o: In function `ar6k_cfg80211_deinit': (.text+0x189b8d): undefined reference to `wiphy_free' drivers/built-in.o: In function `ar6k_cfg80211_init': (.text+0x18add7): undefined reference to `wiphy_new' drivers/built-in.o: In function `ar6k_cfg80211_init': (.text+0x18ae48): undefined reference to `wiphy_register' drivers/built-in.o: In function `ar6k_cfg80211_tkip_micerr_event': (.text+0x18ae95): undefined reference to `cfg80211_michael_mic_failure' drivers/built-in.o: In function `ar6k_cfg80211_scan_node': (.text+0x18afb5): undefined reference to `__ieee80211_get_channel' drivers/built-in.o: In function `ar6k_cfg80211_scan_node': (.text+0x18afd2): undefined reference to `cfg80211_inform_bss_frame' drivers/built-in.o: In function `ar6k_cfg80211_disconnect_event': (.text+0x18b046): undefined reference to `cfg80211_ibss_joined' drivers/built-in.o: In function `ar6k_cfg80211_disconnect_event': (.text+0x18b176): undefined reference to `cfg80211_connect_result' drivers/built-in.o: In function `ar6k_cfg80211_disconnect_event': (.text+0x18b190): undefined reference to `cfg80211_disconnected' drivers/built-in.o: In function `ar6k_cfg80211_connect_event': (.text+0x18b291): undefined reference to `cfg80211_get_bss' drivers/built-in.o: In function `ar6k_cfg80211_connect_event': (.text+0x18b457): undefined reference to `cfg80211_put_bss' drivers/built-in.o: In function `ar6k_cfg80211_connect_event': (.text+0x18b4fa): undefined reference to `cfg80211_roamed' Signed-off-by: Randy Dunlap Cc: Luis R. Rodriguez Cc: Joe Perches Cc: Naveen Singh Signed-off-by: Peter Foley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ath6kl/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/staging/ath6kl/Kconfig b/drivers/staging/ath6kl/Kconfig index 1f15e1fb1ab2..afd6cc16a2b8 100644 --- a/drivers/staging/ath6kl/Kconfig +++ b/drivers/staging/ath6kl/Kconfig @@ -1,6 +1,7 @@ config ATH6K_LEGACY tristate "Atheros AR6003 support (non mac80211)" depends on MMC && WLAN + depends on CFG80211 select WIRELESS_EXT select WEXT_PRIV help -- cgit v1.2.3 From cddac88f437b0370d3c0ac4c0b2d6c1ff914522d Mon Sep 17 00:00:00 2001 From: Nicolas Kaiser Date: Wed, 25 May 2011 02:03:02 +0200 Subject: staging: rts_pstor: use bitwise operator instead of logical one Looks like a typo. Signed-off-by: Nicolas Kaiser Reviewed-by: Peter Huewe Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rts_pstor/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/staging/rts_pstor/sd.c b/drivers/staging/rts_pstor/sd.c index bddb0312b31e..cdae497d5467 100644 --- a/drivers/staging/rts_pstor/sd.c +++ b/drivers/staging/rts_pstor/sd.c @@ -2328,7 +2328,7 @@ Switch_Fail: retval = sd_send_cmd_get_rsp(chip, IO_SEND_OP_COND, 0, SD_RSP_TYPE_R4, rsp, 5); if (retval == STATUS_SUCCESS) { - int func_num = (rsp[1] >> 4) && 0x07; + int func_num = (rsp[1] >> 4) & 0x07; if (func_num) { RTSX_DEBUGP("SD_IO card (Function number: %d)!\n", func_num); chip->sd_io = 1; -- cgit v1.2.3 From c11c4eebdd75fc0f443a3f794a2ddc85afed1932 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Wed, 25 May 2011 14:42:07 +0200 Subject: staging: iio: industrialio-trigger: set iio_poll_func private_data Failure to set iio_poll_func private_data, causes zero pointer access violations in all consumer trigger handlers. Signed-off-by: Michael Hennerich Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/industrialio-trigger.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/staging/iio/industrialio-trigger.c b/drivers/staging/iio/industrialio-trigger.c index 615902333fb0..d504aa251ced 100644 --- a/drivers/staging/iio/industrialio-trigger.c +++ b/drivers/staging/iio/industrialio-trigger.c @@ -294,6 +294,7 @@ struct iio_poll_func pf->h = h; pf->thread = thread; pf->type = type; + pf->private_data = private; return pf; } -- cgit v1.2.3 From d3ac0778801708caecb2b172328064255a350432 Mon Sep 17 00:00:00 2001 From: Arjan Mels Date: Fri, 20 May 2011 23:25:46 +0200 Subject: staging: usbip: bugfix prevent driver unbind Implemented pre_reset and post_reset methods of the driver to prevent the driver from being unbound upon a device reset. Because of this also the asynchronous reset introduced to prevent a race condition is no longer necessary (and sometimes causes problems, because it comes later then expected). Signed-off-by: Arjan Mels Cc: Greg Kroah-Hartman Cc: Takahiro Hirofuchi Cc: Max Vozeler Cc: usbip-devel Signed-off-by: Greg Kroah-Hartman --- drivers/staging/usbip/stub_dev.c | 21 +++++++++++++++++++++ drivers/staging/usbip/stub_rx.c | 20 +++++++++++--------- 2 files changed, 32 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index 6e99ec87fee0..8cbea42b69bc 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c @@ -26,6 +26,8 @@ static int stub_probe(struct usb_interface *interface, const struct usb_device_id *id); static void stub_disconnect(struct usb_interface *interface); +static int stub_pre_reset(struct usb_interface *interface); +static int stub_post_reset(struct usb_interface *interface); /* * Define device IDs here if you want to explicitly limit exportable devices. @@ -59,6 +61,8 @@ struct usb_driver stub_driver = { .probe = stub_probe, .disconnect = stub_disconnect, .id_table = stub_table, + .pre_reset = stub_pre_reset, + .post_reset = stub_post_reset, }; /* @@ -541,3 +545,20 @@ static void stub_disconnect(struct usb_interface *interface) del_match_busid((char *)udev_busid); } } + +/* + * Presence of pre_reset and post_reset prevents the driver from being unbound + * when the device is being reset + */ + +int stub_pre_reset(struct usb_interface *interface) +{ + dev_dbg(&interface->dev, "pre_reset\n"); + return 0; +} + +int stub_post_reset(struct usb_interface *interface) +{ + dev_dbg(&interface->dev, "post_reset\n"); + return 0; +} diff --git a/drivers/staging/usbip/stub_rx.c b/drivers/staging/usbip/stub_rx.c index a5c1fa1f0430..bc57844600b9 100644 --- a/drivers/staging/usbip/stub_rx.c +++ b/drivers/staging/usbip/stub_rx.c @@ -175,16 +175,18 @@ static int tweak_reset_device_cmd(struct urb *urb) dev_info(&urb->dev->dev, "usb_queue_reset_device\n"); /* - * usb_lock_device_for_reset caused a deadlock: it causes the driver - * to unbind. In the shutdown the rx thread is signalled to shut down - * but this thread is pending in the usb_lock_device_for_reset. - * - * Instead queue the reset. - * - * Unfortunatly an existing usbip connection will be dropped due to - * driver unbinding. + * With the implementation of pre_reset and post_reset the driver no + * longer unbinds. This allows the use of synchronous reset. */ - usb_queue_reset_device(sdev->interface); + + if (usb_lock_device_for_reset(sdev->udev, sdev->interface)<0) + { + dev_err(&urb->dev->dev, "could not obtain lock to reset device\n"); + return 0; + } + usb_reset_device(sdev->udev); + usb_unlock_device(sdev->udev); + return 0; } -- cgit v1.2.3 From 3ab8be53155617fa7ecc5b8cd259a458727a1d90 Mon Sep 17 00:00:00 2001 From: Patrik Jakobsson Date: Tue, 24 May 2011 13:04:56 +0100 Subject: staging: gma500: Skip bogus LVDS VBT mode and check for LVDS before adding backlight On the Fit-PC2 the VBT reports an invalid fixed panel mode for LVDS, this gets in the way for SDVO. This patch makes VBT parsing skip the invalid mode. When there is no LVDS output the backlight support crashes so the patch also checks for this before enabling it. Signed-off-by: Patrik Jakobsson Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/gma500/psb_drv.c | 15 ++++++++++++++- drivers/staging/gma500/psb_intel_bios.c | 13 +++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/gma500/psb_drv.c b/drivers/staging/gma500/psb_drv.c index 1c45c11a774e..aa87b1b6a44a 100644 --- a/drivers/staging/gma500/psb_drv.c +++ b/drivers/staging/gma500/psb_drv.c @@ -542,6 +542,8 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset) unsigned long irqflags; int ret = -ENOMEM; uint32_t tt_pages; + struct drm_connector *connector; + struct psb_intel_output *psb_intel_output; dev_priv = kzalloc(sizeof(*dev_priv), GFP_KERNEL); if (dev_priv == NULL) @@ -663,7 +665,18 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset) drm_kms_helper_poll_init(dev); } - ret = psb_backlight_init(dev); + /* Only add backlight support if we have LVDS output */ + list_for_each_entry(connector, &dev->mode_config.connector_list, + head) { + psb_intel_output = to_psb_intel_output(connector); + + switch (psb_intel_output->type) { + case INTEL_OUTPUT_LVDS: + ret = psb_backlight_init(dev); + break; + } + } + if (ret) return ret; #if 0 diff --git a/drivers/staging/gma500/psb_intel_bios.c b/drivers/staging/gma500/psb_intel_bios.c index 48ac8ba7f40b..417965da5e24 100644 --- a/drivers/staging/gma500/psb_intel_bios.c +++ b/drivers/staging/gma500/psb_intel_bios.c @@ -154,10 +154,15 @@ static void parse_lfp_panel_data(struct drm_psb_private *dev_priv, fill_detail_timing_data(panel_fixed_mode, dvo_timing); - dev_priv->lfp_lvds_vbt_mode = panel_fixed_mode; - - DRM_DEBUG("Found panel mode in BIOS VBT tables:\n"); - drm_mode_debug_printmodeline(panel_fixed_mode); + if (panel_fixed_mode->htotal > 0 && panel_fixed_mode->vtotal > 0) { + dev_priv->lfp_lvds_vbt_mode = panel_fixed_mode; + DRM_DEBUG("Found panel mode in BIOS VBT tables:\n"); + drm_mode_debug_printmodeline(panel_fixed_mode); + } else { + DRM_DEBUG("Ignoring bogus LVDS VBT mode.\n"); + dev_priv->lvds_vbt = 0; + kfree(panel_fixed_mode); + } return; } -- cgit v1.2.3 From aaa5c677910d313ca1318c905c799c459c6f0078 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Mon, 30 May 2011 14:28:25 +0800 Subject: staging: gma500: get control from firmware framebuffer if conflicts Many Linux distributions would enable vesafb in order to display early stage boot splash. In this case, we will get garbled X Window screen if running X fbdev on psbfb. This is because fb0 is occupied by vesafb while psbfb is on fb1. They tried to drive the same pieces of hardware at the same time. With unmodified X start-up, it would try to use default fb0 framebuffer device and unfortunately it is now broken becaues fb1 supersedes it. We should let psbfb takeover framebuffer control from vesafb to get around this problem. See also commit : 4410f3910947dcea8672280b3adecd53cec4e85e Signed-off-by: Michael Chang Cc: Alan Cox Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/staging/gma500/psb_fb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers') diff --git a/drivers/staging/gma500/psb_fb.c b/drivers/staging/gma500/psb_fb.c index 99c03a2e06bd..084c36bbfe86 100644 --- a/drivers/staging/gma500/psb_fb.c +++ b/drivers/staging/gma500/psb_fb.c @@ -441,6 +441,16 @@ static int psbfb_create(struct psb_fbdev *fbdev, info->screen_size = size; memset(info->screen_base, 0, size); + if (dev_priv->pg->stolen_size) { + info->apertures = alloc_apertures(1); + if (!info->apertures) { + ret = -ENOMEM; + goto out_err0; + } + info->apertures->ranges[0].base = dev->mode_config.fb_base; + info->apertures->ranges[0].size = dev_priv->pg->stolen_size; + } + drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); drm_fb_helper_fill_var(info, &fbdev->psb_fb_helper, sizes->fb_width, sizes->fb_height); -- cgit v1.2.3 From 0d422f4237ce515678ebbb8781881e5d2e58b9d4 Mon Sep 17 00:00:00 2001 From: Vasanthakumar Thiagarajan Date: Wed, 1 Jun 2011 13:44:11 +0530 Subject: staging: ath6kl: Fix a kernel panic during suspend/resume The kernel panic happens when we try to complete a pending scan request while going to suspend state. The cause for this kernel panic is accessing a freed memory (ar->arWmin). This is freed before ar6k_cfg80211_scanComplete_event() getting called where it is dereferenced. RIP: 0010:[] [] wlan_iterate_nodes+0x16/0xc0 [ath6kl] RSP: 0018:ffff8800719fbce8 EFLAGS: 00010296 RAX: ffff880071bbcc00 RBX: ffff880037b22520 RCX: ffff880077413c80 RDX: ffff880037b221c0 RSI: ffffffffa041ef10 RDI: 0000000000000020 RBP: ffff8800719fbd18 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000400 R11: 0000000000000000 R12: 0000000000000010 R13: ffff8800719fbdd8 R14: 00007fff83a84b60 R15: 0000000000000001 FS: 00007fdccb8a7700(0000) GS:ffff880077400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 0000000000000148 CR3: 0000000070604000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process rmmod (pid: 1998, threadinfo ffff8800719fa000, task ffff880066712d80) Stack: 0000000000000000 ffff880037b22520 0000000000000010 ffff8800719fbdd8 00007fff83a84b60 0000000000000001 ffff8800719fbd28 ffffffffa0429fe2 ffff8800719fbd58 ffffffffa041ee5f ffff8800719fbd58 ffff880037b22520 Call Trace: [] wmi_iterate_nodes+0x12/0x20 [ath6kl] [] ar6k_cfg80211_scanComplete_event+0x3f/0xf0 [ath6kl] [] ar6000_close+0x61/0x100 [ath6kl] [] __dev_close_many+0x96/0x100 [] dev_close_many+0x9d/0x120 [] rollback_registered_many+0xe8/0x290 [] unregister_netdevice_queue+0x96/0x100 [] unregister_netdev+0x20/0x30 [] ar6000_destroy+0x119/0x180 [ath6kl] [] ar6k_cleanup_module+0x2a/0x33 [ath6kl] [] sys_delete_module+0x19e/0x270 [] system_call_fastpath+0x16/0x1b Code: c3 0f 1f 40 00 48 89 df e8 68 ff ff ff eb df 66 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 08 0f 1f 44 00 00 8b af 28 01 00 00 4c 8d 7f 08 49 89 fc 48 89 f3 49 89 d6 41 RIP [] wlan_iterate_nodes+0x16/0xc0 [ath6kl] RSP Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ath6kl/os/linux/cfg80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c index 77dfb4070c1d..d3a774dbb7e8 100644 --- a/drivers/staging/ath6kl/os/linux/cfg80211.c +++ b/drivers/staging/ath6kl/os/linux/cfg80211.c @@ -870,7 +870,8 @@ ar6k_cfg80211_scanComplete_event(struct ar6_softc *ar, int status) if(ar->scan_request) { /* Translate data to cfg80211 mgmt format */ - wmi_iterate_nodes(ar->arWmi, ar6k_cfg80211_scan_node, ar->wdev->wiphy); + if (ar->arWmi) + wmi_iterate_nodes(ar->arWmi, ar6k_cfg80211_scan_node, ar->wdev->wiphy); cfg80211_scan_done(ar->scan_request, ((status & A_ECANCELED) || (status & A_EBUSY)) ? true : false); -- cgit v1.2.3 From 53aebb5312c797e4b63fb50473a55ed054b3cb2f Mon Sep 17 00:00:00 2001 From: Andre Bartke Date: Thu, 2 Jun 2011 00:21:45 +0200 Subject: staging: iio: error case memory leak fix The data pointer should be freed in the error cases of adis16400_trigger_handler(). Signed-off-by: Andre Bartke Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/imu/adis16400_ring.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/iio/imu/adis16400_ring.c b/drivers/staging/iio/imu/adis16400_ring.c index 2589a7e167e4..3612373ddede 100644 --- a/drivers/staging/iio/imu/adis16400_ring.c +++ b/drivers/staging/iio/imu/adis16400_ring.c @@ -137,13 +137,13 @@ static irqreturn_t adis16400_trigger_handler(int irq, void *p) if (st->variant->flags & ADIS16400_NO_BURST) { ret = adis16350_spi_read_all(&indio_dev->dev, st->rx); if (ret < 0) - return ret; + goto err; for (; i < ring->scan_count; i++) data[i] = *(s16 *)(st->rx + i*2); } else { ret = adis16400_spi_read_burst(&indio_dev->dev, st->rx); if (ret < 0) - return ret; + goto err; for (; i < indio_dev->ring->scan_count; i++) { j = __ffs(mask); mask &= ~(1 << j); @@ -158,9 +158,13 @@ static irqreturn_t adis16400_trigger_handler(int irq, void *p) ring->access->store_to(indio_dev->ring, (u8 *) data, pf->timestamp); iio_trigger_notify_done(indio_dev->trig); - kfree(data); + kfree(data); return IRQ_HANDLED; + +err: + kfree(data); + return ret; } void adis16400_unconfigure_ring(struct iio_dev *indio_dev) -- cgit v1.2.3 From e2d4dc5af36673e64e29973c974246eafe63548f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 8 Jun 2011 09:18:32 -0700 Subject: Staging: cx23885: fix include of altera.h The cx23885 driver was including staging/altera.h, but that file has moved back into the driver directory. Why a non-staging driver was including a staging driver is beyond me, but this fixes the build so everything is happy for now. For the record, it's not ok for a non-staging driver to depend on a staging one, as that implies that the non-staging one should also be in the staging tree if that's needed. Cc: Igor M. Liplianin Cc: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/video/cx23885/cx23885-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 2354336862cf..934185cca758 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c @@ -25,8 +25,8 @@ #include #include #include -#include +#include "../../../staging/altera-stapl/altera.h" #include "cx23885.h" #include "tuner-xc2028.h" #include "netup-init.h" -- cgit v1.2.3 From 8eb73c6c2675f708283822bd058ad1e416836ba2 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 9 Jun 2011 10:18:23 +0300 Subject: Staging: mei: fix debug code ! has higher precedence than !=. H_RDY is 8 and since neither 0 nor 1 are equal to 8 the original condition was always true. Signed-off-by: Dan Carpenter Acked-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- drivers/staging/mei/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/mei/init.c b/drivers/staging/mei/init.c index 2818851c0761..d1ffa32cd141 100644 --- a/drivers/staging/mei/init.c +++ b/drivers/staging/mei/init.c @@ -205,10 +205,10 @@ int mei_hw_init(struct mei_device *dev) "host_hw_state = 0x%08x, me_hw_state = 0x%08x.\n", dev->host_hw_state, dev->me_hw_state); - if (!(dev->host_hw_state & H_RDY) != H_RDY) + if (!(dev->host_hw_state & H_RDY)) dev_dbg(&dev->pdev->dev, "host turn off H_RDY.\n"); - if (!(dev->me_hw_state & ME_RDY_HRA) != ME_RDY_HRA) + if (!(dev->me_hw_state & ME_RDY_HRA)) dev_dbg(&dev->pdev->dev, "ME turn off ME_RDY.\n"); printk(KERN_ERR "mei: link layer initialization failed.\n"); -- cgit v1.2.3 From 8aa460e9e9f6eb6c23c8b244516bedddee901ceb Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Thu, 9 Jun 2011 16:21:00 +0200 Subject: staging: iio: max517: Fix iio_info changes struct iio_info introduced a bug where the second channel of a MAX518 can't be used. This commit fixes the typo (using max518 instead of the max517 struct). Signed-off-by: Roland Stigge Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/dac/max517.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/staging/iio/dac/max517.c b/drivers/staging/iio/dac/max517.c index 881768df47a6..2fe34d21b6aa 100644 --- a/drivers/staging/iio/dac/max517.c +++ b/drivers/staging/iio/dac/max517.c @@ -195,7 +195,7 @@ static const struct iio_info max517_info = { }; static const struct iio_info max518_info = { - .attrs = &max517_attribute_group, + .attrs = &max518_attribute_group, .driver_module = THIS_MODULE, }; -- cgit v1.2.3