summaryrefslogtreecommitdiffstats
path: root/drivers/staging/gdm724x/gdm_mux.c
Commit message (Collapse)AuthorAgeFilesLines
* Staging: gdm724x: Use min instead of ternary operatorBhumika Goyal2016-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch replaces ternary operator with macro min as it shorter and thus increases code readability. Macro min return the minimum of the two compared values. Made a semantic patch for changes: @@ type T; T x; T y; @@ ( - x < y ? x : y + min(x,y) | - x > y ? x : y + max(x,y) ) Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm724x: gdm_mux: Remove create_workqueue()Amitoj Kaur Chawla2016-02-151-15/+3Star
| | | | | | | | | | | | | | | | | | | With concurrency managed workqueues, use of dedicated workqueues can be replaced by using system_wq. Drop mux_rx_wq by using system_wq. Since there is only one work item per mux_dev and different mux_devs do not need to be ordered, increase of concurrency level by switching to system_wq should not break anything. cancel_work_sync() is used to ensure that work is not pending or executing on any CPU. Lastly, since all devices are suspended, which shutdowns the work item before the driver can be unregistered, it is guaranteed that no work item is pending or executing by the time exit path runs. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm724x: remove multiple blank linesIoana Ciornei2015-10-251-4/+0Star
| | | | | | | | This patch removes multiple blank lines in order to follow linux kernel coding style. Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm724x: correct kzalloc/kmalloc sizeof argumentIoana Ciornei2015-10-251-4/+4
| | | | | | | | This patch converts sizeof(TYPE) to sizeof(VAR) when used as a kzalloc/kmaloc argument. Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm724x: add spaces around binary operatorsIoana Ciornei2015-10-251-2/+2
| | | | | | | | This patch add spaces around binary operators in order to follow kernel coding style. Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* stating: gdm724x: remove explicit NULL comparisonIoana Ciornei2015-10-251-2/+2
| | | | | | | | | | | | | | | | This patch converts explicit NULL comparison to its shorter equivalent form. Done with coccinelle semantic patch: @@ expression e; @@ - e == NULL + !e Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm724x: properly indent to match open paranthesisIoana Ciornei2015-10-251-1/+1
| | | | | | | | Indent parameters and arguments passed to function calls to match open paranthesis Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: gdx724x: gdm_mux: Remove explicit castShivani Bhardwaj2015-10-171-1/+1
| | | | | | | | | | | | | | | | | Compiler can typecast variables implicitly so, explicit type cast is not required and should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: gdm724x: Remove unnecessary cast on void pointerShraddha Barke2015-10-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | void pointers do not need to be cast to other pointer types. Semantic patch: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm724x: Correction of variable usage after applying ALIGN()SÅ‚awomir Demeszko2015-05-101-9/+7Star
| | | | | | | | | | | | | | Fix regression introduced by commit <29ef8a53542a>. After it writing AT commands to /dev/GCT-ATM0 is unsuccessful (no echo, no response) and dmesg show "gdmtty: invalid payload : 1 16 f011". Before that commit value of dummy_cnt was only a padding size. After using ALIGN() this value is increased by its first argument. So the following usage of this variable needs correction. Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com> Cc: stable <stable@vger.kernel.org> # 3.14+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: gdm724x: replace pr_* with dev_*Haneen Mohammed2015-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replace pr_err/pr_info with dev_err/dev_info, when appropriate device structure is found. Issue found and resolved using the following Coccinelle script. pr_err/dev_err was substituted with pr_info/dev_info in the later case. @r exists@ identifier f, s, i; position p; @@ f(...,struct s *i,...) { <+... when != i == NULL pr_err@p(...); ...+> } @rr@ identifier r.s, s2, fld; @@ struct s { ... struct s2 *fld; ... }; @rrr@ identifier rr.s2, fld2; @@ struct s2 { ... struct device fld2; ... }; @@ identifier r.i, r.s, rr.fld, rrr.fld2; position r.p; @@ -pr_err@p +dev_err ( + &i->fld->fld2, ...) Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: gdm724x: replace pr_err with dev_errHaneen Mohammed2015-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replace pr_err with dev_err, when appropriate device structre is found. Issue found using the following Coccinelle script: @r exists@ identifier f, s, i; position p; @@ f(...,struct s *i,...) { <+... when != i == NULL pr_err@p(...); ...+> } @rr@ identifier r.s, fld; @@ struct s { ... struct device *fld; ... }; @@ identifier r.i, rr.fld; position r.p; @@ -pr_err@p +dev_err ( + i->fld, ...) Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: gdm724x: fix space before comma coding style issue in gdm_mux.cRobert Nachlinger2015-01-171-1/+1
| | | | | | | | This is a patch to the gdm_mux.c file that fixes a space before comma coding style issue found by the checkpatch.pl tool. Signed-off-by: Robert Nachlinger <robert.nachlinger@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm724x: Fix missing blank line warning.Gulsah Kose2014-09-201-0/+1
| | | | | | | | | Fixes "Missing a blank line after declarations" checkpatch.pl warning in gdm_mux.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: gdm724x: gdm_mux.c: fixed coding styleDaniel Ngu2014-03-171-10/+16
| | | | | | | Line over 80 characters Signed-off-by: Daniel Ngu <daniel.dy.ngu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: gdm724x: Use ALIGN() macro for dummy_cnt in gdm_mux.cRashika Kheria2013-11-101-6/+2Star
| | | | | | | | | | | As suggested in TODO list, this patch uses ALIGN() macro for variable dummy_cnt in functions up_to_host() and gdm_mux_send() in file gdm_mux.c. The macro has already been defined in include/linux/kernel.h, hence is not defined again. Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm7240: fix memory leak on failure pathAlexey Khoroshilov2013-10-121-2/+2
| | | | | | | | | | init_usb() may fail after some of mux_rxes already allocated. So we need to release them on the failure path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm7240: alloc_mux_rx() does not need GFP_ATOMICAlexey Khoroshilov2013-10-121-3/+3
| | | | | | | | | | As far as alloc_mux_rx() is called from probe() only there is no need in GFP_ATOMIC here. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm724x: Fix sparse warnings regarding static functions/variablesValentina Manea2013-10-111-2/+2
| | | | | | | | | | This fixes sparse warnings for functions and variables, e.g.: * drivers/staging/gdm724x/gdm_mux.c:29:25: warning: symbol 'mux_rx_wq' was not declared. Should it be static? Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Reviewed-by: Zach Brown <zab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm7240: fix error handling of probe()Dan Carpenter2013-08-211-32/+25Star
| | | | | | | | The error handling is messy and not in kernel style. On some paths it frees "mux_dev" twice. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm7240: a TTY rewrite according to the latest TTY APIsWon Kang2013-08-201-5/+4Star
| | | | | | | | | Fixed mis-use of mutex for gdm_table. gdm_table is refered to only inside tty_install and port destrcut, and usb callbacks use internal reference which was saved during urb submission Signed-off-by: Won Kang <wonkang@gctsemi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm724x: use GFP_ATOMIC under spin lockWei Yongjun2013-07-271-1/+1
| | | | | | | | A spin lock is taken here so we should use GFP_ATOMIC. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm724x: Remove version.h header inclusion in gdm_mux.cSachin Kamat2013-07-251-1/+0Star
| | | | | | | | version.h header inclusion is not necessary as detected by versioncheck. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm724x: Update loggingJoe Perches2013-07-251-21/+20Star
| | | | | | | | | | | | | | | | Make the logging prefixes match the module names by adding #define pr_fmt(fmt) KBUILD_MODNAME and converting printks to netdev_<level> when a struct netdevice * is available and and pr_<level> when not. Remove embedded prefixes. Add missing terminating newlines. Remove an unnecessary rx-dropped message. Remove an unnecessary temporary variable. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: gdm7240: adding LTE USB driverWon Kang2013-07-241-0/+700
GCT Semiconductor GDM7240 is 4G LTE chip. This driver supports GCT reference platform as a USB device. Signed-off-by: Won Kang <wonkang@gctsemi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>