Commit graph

13 commits

Author SHA1 Message Date
Rashika Kheria 7ed57bca58 Staging: btmtk_usb: Fix Sparse Warning of incorrect type in assignment
This patch fixes the following Sparse Warnings in btmtk_usb.c:

drivers/staging/btmtk_usb/btmtk_usb.c:676:39: warning: incorrect type in assignment (different base types)
drivers/staging/btmtk_usb/btmtk_usb.c:676:39:    expected unsigned int [unsigned] [usertype] packet_header
drivers/staging/btmtk_usb/btmtk_usb.c:676:39:    got restricted __le32 [usertype] <noident>

drivers/staging/btmtk_usb/btmtk_usb.c:736:31: warning: incorrect type in assignment (different base types)
drivers/staging/btmtk_usb/btmtk_usb.c:736:31:    expected unsigned int [unsigned] [addressable] [usertype] packet_header
drivers/staging/btmtk_usb/btmtk_usb.c:736:31:    got restricted __le32 [usertype] <noident>

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:32:28 -07:00
Rashika Kheria 17cba02f9a Staging: btmtk_usb: Fix Sparse Warning of incorrect casting
This patch fixes the following Sparse Warnings in btmtk_usb.c:

drivers/staging/btmtk_usb/btmtk_usb.c:110:16: warning: cast to restricted __le32
drivers/staging/btmtk_usb/btmtk_usb.c:299:23: warning: cast to restricted __le16

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:41:08 -07:00
Rashika Kheria 8365882373 Staging: btmtk_usb: Fix line length exceeding 80 characters using min_t macro
This patch fixes the following checkpatch.pl warning in btmtk_usb.c:
WARNING: line over 80 characters in the file
by using kernel built_in min_t macro.

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Zach Brown <zab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:17:54 -07:00
Rashika Kheria 4ddffcca5e Staging: btmtk_usb: Fix indentation for conditional statement
The patch fixes the following checkpatch.pl warning in btmtk_usb.c
WARNING: suspect code indent for conditional statements

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:17:54 -07:00
Rashika Kheria b86e2ff5c4 Staging: btmtk_usb: Removal of Unnecessary white spaces
The patch fixes the following checkpatch.pl warning in btmtk_usb.c
WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Zach Brown <zab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:17:53 -07:00
Rashika Kheria c27bd078d1 Staging: btmtk_usb: Fix incorrect brace placement
The patch fixes the following checkpatch.pl warning in btmtk_usb.c
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Zach Brown <zab@redhat.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:13:43 -07:00
Rashika Kheria 633a34bda5 Staging: btmtk_usb: Fix line length exceeding 80 characters
This patch fixes the following checkpatch.pl warning in btmtk_usb.c
WARNING: line over 80 characters in the file

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:13:43 -07:00
Devendra Naga 51dd7d2995 staging: btmtk_usb: use GFP_KERNEL inplace of GFP_ATOMIC in _probe path
the _probe function doesn't run in interrupt context, so no need to use
the GFP_ATOMIC allocations, instead driver can request for GFP_KERNEL

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03 12:35:53 -07:00
Devendra Naga cff2ae2185 staging: btmtk_usb: check for a valid io_buf pointer
assigned to retval of kmalloc but not checked whether the allocation failed or not,
fail the registering if allocation fail

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:02:06 +09:00
Wei Yongjun cb41571aca staging: btmtk_usb: remove unused including <linux/version.h>
Remove including <linux/version.h> that don't need it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 10:54:45 -07:00
Peter Huewe d1eef5b602 staging/btmtk_usb: Mark local functions as static
sparse complains about some local functions not being static:
drivers/staging/btmtk_usb/btmtk_usb.c:50:6:
warning: symbol 'hex_dump' was not declared. Should it be static?
drivers/staging/btmtk_usb/btmtk_usb.c:227:5:
warning: symbol 'checksume16' was not declared. Should it be static?

-> add the static keyword

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-20 10:16:18 -07:00
Peter Huewe e516658559 staging/btmtk_usb: use module_usb_driver to register driver
Removing some boilerplate by using module_usb_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-20 10:16:17 -07:00
Cho, Yu-Chen 0d751eca3b Staging: add USB MTK bluetooth driver
This driver is for the Mediatek Bluetooth that can be found in many
different laptops.  It was written by Mediatek, but cleaned up to
work properly in the kernel tree by SUSE.

--
Changes since v1:
 1.fixed built error , because build path typo.
 2.change to correct version number.

Signed-off-by: Cho, Yu-Chen <acho@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 15:43:48 -07:00