Commit Graph

33 Commits

Author SHA1 Message Date
Marek Belisko 626888df7f staging: ft1000-usb: Change KERN_ERROR usage to pr_err in ft1000_usb.c.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 19:06:17 -07:00
Masanari Iida aaf3ee4f80 staging: ft1000: Fix typo in ft1000_usb.c
Correct spelling typo within debug message of ft1000_usb.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-11 17:21:54 -07:00
Devendra Naga b7c5a774b0 staging/ft1000: remove unnecessary assignment of ret with STATUS_SUCCESS
as ret is assigned to the return of ft1000_poll, we dont need to
initialise ret with STATUS_SUCCESS.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 12:26:43 -07:00
Devendra Naga 3bc2311e32 staging/ft1000: fix sparse warning about the kernel thread handler function
sparse throws warning about the ft1000_poll_thread as

drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:40:5: warning: symbol 'ft1000_poll_thread' was not declared. Should it be static?

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 12:26:43 -07:00
Devendra Naga 42ad4a8da5 staging/ft1000: use kzalloc to allocate the ft1000_device structure
with kzalloc the allocate memory is set to zero, so no need of
calling memset again on the allocated memory

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20 16:07:07 -07:00
Devendra Naga b10c0b92ca staging/ft1000: Return -ENOMEM if kmalloc fails at ft1000_probe
If the kmalloc fails return -ENOMEM , returning 0 is not the proper
way if any function fails

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20 16:07:07 -07:00
Greg Kroah-Hartman bac2c126e4 USB: convert drivers/staging/* to use module_usb_driver()
This converts the drivers in drivers/staging/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.

Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.

Cc: "David Täht" <d@teklibre.com>
Cc: Marek Belisko <marek.belisko@gmail.com>
Cc: Al Cho <acho@novell.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Huajun Li <huajun.li.lee@gmail.com>
Cc: Zac Storer <zac.3.14159@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: edwin_rong <edwin_rong@realsil.com.cn>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Julia Lawall <julia@diku.dk>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Joe Perches <joe@perches.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 09:42:11 -08:00
Marek Belisko dab56ffe9a staging: ft1000: Fix camelcase function names.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-16 12:18:25 -08:00
Marek Belisko 1c46282421 staging: ft1000: Use return value for ft1000InitProc.
Add checking for return value ft1000InitProc and cleanup
if something fail.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09 16:35:13 -08:00
Marek Belisko 4d791234f4 staging: ft1000: Fix camelcase functions and variables.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09 16:34:32 -08:00
Marek Belisko 4960b8fe1b staging: ft1000: Fix goto error logic.
Fix goto error logic which could lead to kernel panics
because kthread_stop() is called in not correct error
conditions. Seen it sometimes when dsp_reload() fails
then I got kernel panic.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29 11:45:24 -08:00
Marek Belisko 7716090be5 staging: ft1000: Fix compilation warning.
This patch fix following warning:
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:67:22:
warning: ‘pft1000info’ may be used uninitialized in this function

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-19 17:17:00 -08:00
Joe Perches e33196e108 drivers/staging: Remove unnecessary casts of netdev_priv
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:06:47 -08:00
Marek Belisko e72115bce3 staging: ft1000: Fix error goto statements.
With commit 2dab1ac81b there
was intruduced error which lead to stopping uninitialized
kthread which leads to kernel panics.

This patch fix problems with common entry point in correct
way.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 11:31:21 -08:00
Marek Belisko 2dab1ac81b staging: ft1000: Create common return point.
When reg_ft1000_netdev() fails created kthread isn't stopped.
So add return point for stopping thread.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-10 16:28:29 -08:00
Marek Belisko c8b124e21d staging: ft1000: Check return value of kthread_run.
kthread_run could fail so we will check return value.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-10 16:28:29 -08:00
Marek Belisko 81584137d8 staging: ft1000: Get rid of BOOLEAN typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:06 -08:00
Marek Belisko 019bd3f825 staging: ft1000: Remove dead code.
Remove functions which was used nowhere. Also remove dead
variables used by this functions.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:07:02 -08:00
Marek Belisko 1a88a06871 staging: ft1000: Remove FT1000_INFO typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:08:51 -07:00
Marek Belisko aaf0885c30 staging: ft1000: Use specific error return code for reg_ft1000_netdev().
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:42:45 -07:00
Marek Belisko dd9b6aa4fd staging: ft1000: Check return value when init net device.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:41:34 -07:00
Marek Belisko 47873d331c staging: ft1000: correct indentations for ft1000_usb.c file.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:10:05 -07:00
Marek Belisko 3d97ca7f36 staging: ft1000: replace and remove c99 comments.
Comments for probe, disconnect, init and exit functions
removed completely (functions names are self explaining).

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:10:04 -07:00
Marek Belisko c6f2c47b16 staging: ft1000: lines over 80 characters corrected.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:10:04 -07:00
Marek Belisko 0f570d8c5e staging: ft1000: various checkpatch.pl fixes.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:10:04 -07:00
Marek Belisko 4aee92f6de staging: ft1000: Remove unused/unnecessary comments.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 09:05:52 -07:00
Marek Belisko 7bfc9ca790 staging: ft1000: Fix memory leak when polling fail.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 09:05:50 -07:00
Marek Belisko 5cb9954a51 staging: ft1000-usb: Remove global flag DSP_loading.
This patch remove global flag DSP_loading which was checked
only on one place. Instead check return value for dsp_reload() function.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 09:05:48 -07:00
Marek Belisko ada541f0cb staging: ft1000-usb: Add correct procedure for fw image downloading.
call request_firmware instead of trying to open the file directly from
the kernel driver.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-07 10:10:59 -07:00
Arnd Bergmann 2a953cfd42 staging/ft1000-usb: fix problems found by sparse
In the original code, address space annotations are missing,
which hides a possible unchecked user pointer access.

Two functions use a lot of stack space.

Extern declarations are all in the wrong place, which leads
to type differences between caller and callee in some cases.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-05 08:50:14 -07:00
Arnd Bergmann 7cfd8a3720 staging/ft1000-usb: fix build warnings
This lets us see clearer when stuff breaks.

Most of the changes are fixes for casts between int and pointer
that don't work on 64 bit.

The ioctl function uses a large amount of stack, which gets
fixed by allocating the buffer dynamically.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-05 08:50:14 -07:00
Greg Kroah-Hartman bf3146c865 Staging: ft1000: remove trailing whitespace
Lots of trailing whitespace was removed

Cc: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-22 08:34:49 -07:00
Marek Belisko f7c1be0cca Staging: Add support for Flarion OFDM usb and pcmcia devices.
This drivers add support for following devices:

(usb)-> Qleadtek FLASH-OFDM USB Modem [LR7F04]
     -> Qleadtek Express Card
     -> Leadtek Multi-band modem HSDPA

Sources for usb:
https://sourceforge.net/projects/ft1000/files/ft1000_usb/ft1000_usb_v01.04.tar.gz/download

(pcmcia) -> Multimedia Net Card

Sources for pcmcia :
https://sourceforge.net/projects/ft1000/files/ft1000_pcmcia_2.6.30-2.6.31.tgz/download

More informations (in Slovak language):
	http://ft1000.qintec.sk/home.html

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-22 08:24:30 -07:00