Search Linux Wireless

Re: [PATCH 6/6] compat-drivers: do not use struct spinlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 28, 2012 at 3:07 PM, Hauke Mehrtens <hauke@xxxxxxxxxx> wrote:
> struct spinlock does not exists on kernel version <= 2.6.32, use
> spinlock_t instead.
>
> Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
> ---
>  patches/network/67-use_spinlock_t.patch |   11 +++++++++++
>  1 file changed, 11 insertions(+)
>  create mode 100644 patches/network/67-use_spinlock_t.patch
>
> diff --git a/patches/network/67-use_spinlock_t.patch b/patches/network/67-use_spinlock_t.patch
> new file mode 100644
> index 0000000..4c9f315
> --- /dev/null
> +++ b/patches/network/67-use_spinlock_t.patch
> @@ -0,0 +1,11 @@
> +--- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.h
> ++++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.h
> +@@ -158,7 +158,7 @@ typedef int (*brcmf_fweh_handler_t)(stru
> +  */
> + struct brcmf_fweh_info {
> +       struct work_struct event_work;
> +-      struct spinlock evt_q_lock;
> ++      spinlock_t evt_q_lock;
> +       struct list_head event_q;
> +       int (*evt_handler[BRCMF_E_LAST])(struct brcmf_if *ifp,
> +                                        const struct brcmf_event_msg *evtmsg,

This should have still worked, I thought for a second based on your
backport patch we ditched the spinlock_t or perhaps this was related
to the realtime work Thomas has been doing but upon further inspection
I see now this is simply a discrepancy on sloppy driver development.

IMHO your patch should go upstream and a respective patch should be
submitted as well as for these drivers:

mcgrof@frijol ~/linux-next (git::master)$ git grep "struct spinlock" drivers/
drivers/crypto/ux500/cryp/cryp.h:       struct spinlock ctx_lock;
drivers/crypto/ux500/cryp/cryp.h:       struct spinlock power_state_spinlock;
drivers/crypto/ux500/hash/hash_alg.h:   struct spinlock         ctx_lock;
drivers/crypto/ux500/hash/hash_alg.h:   struct spinlock
power_state_lock;
drivers/gpu/drm/i915/i915_drv.h:        struct spinlock gt_lock;
drivers/gpu/drm/i915/i915_drv.h:                struct spinlock lock;
drivers/media/platform/s5p-fimc/mipi-csis.c:    struct spinlock slock;
drivers/media/platform/s5p-jpeg/jpeg-core.h:    struct spinlock         slock;
drivers/watchdog/ie6xx_wdt.c:   struct spinlock unlock_sequence;

Alexander, please also add your driver to the MAINTAINERS file.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux