summaryrefslogtreecommitdiffstats
path: root/drivers/staging/cxt1e1/linux.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: cxt1e1: remove driverKristina Martšenko2014-07-011-1142/+0
| | | | | | | | | | Remove the driver as it hasn't been cleaned up and it doesn't look like anyone is going to work on it anymore. This can be reverted if someone wants to work to fix the remaining issues the driver has. Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com> Cc: Bob Beers <bob.beers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ctx1e1: remove checks for three macrosPaul Bolle2014-05-261-17/+0
| | | | | | | | | | | | | When the ctx1e1 driver was added in v2.6.35 it contained checks for CONFIG_SBE_HDLC_V7, CONFIG_SBE_WAN256T3_HDLC_V7, and CONFIG_SBE_WAN256T3_NCOMM (and MODULE variants). The related Kconfig symbols didn't exist then. They still don't exist now. Remove these checks. Do some related cleaning up and remove the unused V7() macro too. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: cxt1e1: replace OS_kmalloc/OS_kfree with kzalloc/kfreeDaeseok Youn2014-04-181-11/+10
| | | | | | | | | | | Replace OS_kmalloc/OS_kfree with kzalloc/kfree. And also some allocation doesn't need to use GFP_DMA so just use GFP_KERNEL. c4_new() function is never called, remove it. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: cxt1e1: remove unneeded mkret() callsDaeseok Youn2014-03-181-45/+27
| | | | | | | | | | The mkret() change a value of error from positive to negative. This patch is modified to return negative value when it failed. It doesn't need to call with function for changing from positive to negative. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: cxt1e1: Fix Sparse Warning for Static Declarations in linux.cHimangi Saraogi2014-03-181-4/+4
| | | | | | | | | | | This patch fixes the following sparse warnings: drivers/staging/cxt1e1/linux.c:106:13: warning: symbol 'log_level_default' was not declared. Should it be static? drivers/staging/cxt1e1/linux.c:110:13: warning: symbol 'max_mru_default' was not declared. Should it be static? drivers/staging/cxt1e1/linux.c:255:1: warning: symbol 'c4_linux_interrupt' was not declared. Should it be static? drivers/staging/cxt1e1/linux.c:265:1: warning: symbol 'c4_ebus_interrupt' was not declared. Should it be static? Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: cxt1e1: Fix do not use // c99 commentsGulsah Kose2014-03-181-6/+0
| | | | | | | This patch fixes "do not use // C99 comments" errors in linux.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: cxt1e1: remove redundant memset() callDaeseok Youn2014-03-171-5/+3
| | | | | | | | | | | The name array doens't need to set to 0. Because sprintf/snprintf adds a terminating '\0'. And also it doesn't need to assign name array address to np pointer. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 3.14-rc7 into staging-nextGreg Kroah-Hartman2014-03-171-0/+2
|\ | | | | | | | | | | | | | | This resolves a merge issue with drivers/staging/cxt1e1/linux.c that was fixed in a report from Stephen Rothwell Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging/cxt1e1/linux.c: Correct arbitrary memory write in c4_ioctl()Salva Peiró2014-03-041-0/+2
| | | | | | | | | | | | | | | | | | | | The function c4_ioctl() writes data from user in ifr->ifr_data to the kernel struct data arg, without any iolen bounds checking. This can lead to a arbitrary write outside of the struct data arg. Corrected by adding bounds-checking of iolen before the copy_from_user(). Signed-off-by: Salva Peiró <speiro@ai2.upv.es> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: cxt1e1: fix checkpatch errors with open brace '{'Daeseok Youn2014-03-081-46/+21
| | | | | | | | | | | | | | | | clean up checkpatch.pl error in linux.c: ERROR: that open brace { should be on the previous line Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: cxt1e1: fix checkpatch error 'assignment in if condition'Daeseok Youn2014-03-081-12/+19
| | | | | | | | | | | | | | | | checkpatch.pl error in linux.c: ERROR: do not use assignment in if condition Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: cxt1e1: removed version string declarationShaun Laing2014-03-061-3/+0
| | | | | | | | | | | | | | | | | | Removed the unneeded pmcc4_OSSI_release version string, as well as the now unused 'release' element of the sbe_card_info struct. This also resolves a sparse "should it be static" warning. Signed-off-by: Shaun Laing <shaun@xresource.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: cxt1e1: Fix line length over 80 characters in linux.cDaeseok Youn2014-03-041-17/+31
| | | | | | | | | | | | | | | | clean up checkpatch.pl warnings: WARNING: Line length over 80 characters Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: cxt1e1: Fix no spaces at the start of a line in linux.cDaeseok Youn2014-03-041-735/+743
| | | | | | | | | | | | | | | | clean up checkpatch.pl warnings: WARNING: please no spaces at the start of a line in Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: cxt1e1: remove space between function name and parenthesisDaeseok Youn2014-03-041-262/+262
|/ | | | | | | | | clean up checkpatch.pl warnings in linux.c: WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Drivers: Staging: cxt1e1: use __dev_get_name instead of dev_get_name to find ↵Ying Xue2014-01-141-8/+7
| | | | | | | | | | | | | | | | | | | | interfaces The following call chain denotes that both do_reset() and do_del_chan() are protected under rtnl_lock. If we use __dev_get_by_name() instead of dev_get_by_name() to find interface handlers in them, this would help us avoid to change interface reference counter. dev_ioctl() rtnl_lock() dev_ifsioc() c4_ioctl() do_reset() do_del_chan() rtnl_unlock() Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* staging: cxt1e1: linux.c: Return negative error codesSachin Kamat2013-09-301-1/+1
| | | | | | | | Return negative error codes as is followed in the rest of the kernel. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: cxt1e1: linux.c: Use NULL instead of 0Sachin Kamat2013-09-301-13/+13
| | | | | | | Pointers should be assigned NULL instead of 0. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: cxt1e1: Remove #define SBE_INCLUDE_SYMBOLSShaun Laing2013-08-121-29/+23
| | | | | | | | | | | | | | Removed the unneeded SBE_INCLUDE_SYMBOLS #define, and the associated STATIC #define, and replaced all occurances of STATIC with 'static'. This was in response to sparse warnings of the form "symbol 'XYZ' was not declared. Should it be static?". Removed a function prototype (musycc_init_port) as adding the 'static' declaration produced a new gcc warning. (musycc_init_port is only declared if SBE_WAN256T3_ENABLE is set) Signed-off-by: Shaun Laing <shaun@xresource.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging/cxt1e1:Fixing foo * bar should be foo *barDulshani Gunawardhana2013-05-221-32/+32
| | | | | | | This patch fixes the variable naming error foo * bar should be foo *bar. Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: cxt1e1: buffer overflow in do_del_chan()Dan Carpenter2013-01-251-1/+3
| | | | | | | | If we don't restrict "cp.channum" to 3 digits then the sprintf() will overflow. I've added a check and changed the sprintf() to snprintf(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: cxt1e1: solve coding style problemDevendra Naga2012-09-041-5/+5
| | | | | | | | remove the spaces and replace with tabs at the beginning of a line and also remove space between function call and its open paranthesis Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: cxt1e1: use kernel's way of returning error codesDevendra Naga2012-09-041-1/+1
| | | | | | | | The error codes the kernel functions return are -ve numbers, convert this function to follow the other kernel functions Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: Add module.h to more drivers implicitly using it.Paul Gortmaker2011-10-311-0/+1
| | | | | | | | This 2nd batch of implicit module.h users only appeared when we removed the unnecessary module.h from include/linux/miscdevice.h [The 1st batch is already present in Greg's staging tree.] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* staging: irq: Remove IRQF_DISABLEDYong Zhang2011-09-161-6/+0
| | | | | | | This flag is a NOOP and can be removed now. Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: Fix some incorrect use of positive error codes.Ralph Loader2011-01-211-1/+1
| | | | | | | | | | | | | | Use -E... instead of just E... in a few places where negative error codes are expected by a functions callers. These were found by grepping with coccinelle & then inspecting by hand to determine which were bugs. The staging/cxt1e1 driver appears to intentionally use positive E... error codes in some places, and negative -E... error codes in others, making it hard to know which is intended where - very likely I missed some problems in that driver. Signed-off-by: Ralph Loader <suckfish@ihug.co.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: cxt1e1: rename global log_level variableGreg Kroah-Hartman2010-12-101-9/+9
| | | | | | | | The driver should not have such a generic global variable name. Reported-by: Zimny Lech <napohybelskurwysynom2010@gmail.com> Cc: Bob Beers <bob.beers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: cxt1e1: multiple definition of max_mtu fixBob Beers2010-10-191-10/+10
| | | | | | | | eliminate multiple definition of max_mtu by renaming with cxt1e1_ prefix, similarly rename max_mru Signed-off-by: Bob Beers <bbeers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: cxt1e1: remove code guarded by GENERIC_HDLC_VERSIONJiri Kosina2010-06-181-40/+0
| | | | | | | | Current linux kernel has GENERIC_HDLC_VERSION equal to 4, no need to have dead code in-kernel which was there for ancient kernel versions. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: cxt1e1: remove all code dependent on LINUX_VERSION_CODEJiri Kosina2010-06-181-123/+0
| | | | | | | | | | | Remove all code which is dead for in-kernel driver due to being ifdefed by LINUX_VERSION_CODE. While at it, also remove surrounding code which is commented out, or '#if 1' nops. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: staging/cxt1e1: Convert bare printks to pr_<level>Joe Perches2010-05-111-13/+15
| | | | | | | | | | Added #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt A few line splits for long arguments A couple of embedded function names converted to "%s", __func__ Removed some uses of THIS_MODULE->name Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: cxt1e1: fix cxt1e1 module namesJoe Perches2010-05-111-19/+19
| | | | | | | | | | | | On Mon, 2010-05-03 at 10:09 -0700, Randy Dunlap wrote: > Lots of cxt1e1 source code uses THIS_MODULE->name, which won't build > when CONFIG_MODULES is not enabled, so use KBUILD_MODNAME instead. Perhaps a conversion to pr_<level> is better? Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: cxt1e1: use netdev_priv to fix buildRandy Dunlap2010-05-111-1/+1
| | | | | | | | | Fix cxt1e1 build error: drivers/staging/cxt1e1/linux.c:1195: error: 'struct net_device' has no member named 'priv' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Bob Beers <bob.beers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: Add driver to support wanPMC-CxT1E1 card.Bob Beers2010-05-111-0/+1354
Obviously still needs serious attention, but it compiles. Original author: Rick Dobbs Add driver to support wanPMC-CxT1E1 card. This card provides 1-4 ports of T1E1 in PMC form factor. Note, Rick doesn't want his email showing up as the "From:" author, but has given his blessing to have the code included in the kernel tree. Signed-off-by: Bob Beers <bob.beers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud