dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

5434 Commits

Author SHA1 Message Date
Greg Kroah-Hartman 81f1620357 Staging: hv: netvsc: call vmbus_establish_gpadl directly
Don't do the interface indirection, it's not needed at all.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-21 08:48:19 -07:00
Greg Kroah-Hartman 98873724aa Staging: hv: channel: export vmbus_establish_gpadl to modules
Drivers need to call this directly, so export it, like other
vmbus functions.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-21 08:47:43 -07:00
Greg Kroah-Hartman a787705720 Staging: hv: remove TeardownGpadl from struct vmbus_channel_interface
No one calls it anymore, so remove it.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-21 08:42:55 -07:00
Greg Kroah-Hartman 314bf1d12a Staging: hv: netvsc: call vmbus_teardown_gpadl directly
Don't do the interface indirection, it's not needed at all.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-21 08:40:55 -07:00
Greg Kroah-Hartman 18726d7a60 Staging: hv: channel: export vmbus_teardown_gpadl to modules
Drivers need to call this directly, so export it, like other vmbus
functions.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-21 08:39:59 -07:00
Arnd Bergmann 6de5bd128d BKL: introduce CONFIG_BKL.
With all the patches we have queued in the BKL removal tree, only a
few dozen modules are left that actually rely on the BKL, and even
there are lots of low-hanging fruit. We need to decide what to do
about them, this patch illustrates one of the options:

Every user of the BKL is marked as 'depends on BKL' in Kconfig,
and the CONFIG_BKL becomes a user-visible option. If it gets
disabled, no BKL using module can be built any more and the BKL
code itself is compiled out.

The one exception is file locking, which is practically always
enabled and does a 'select BKL' instead. This effectively forces
CONFIG_BKL to be enabled until we have solved the fs/lockd
mess and can apply the patch that removes the BKL from fs/locks.c.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2010-10-21 15:44:13 +02:00
Mauro Carvalho Chehab 9efd85dfff [media] tm6000: fix resource locking
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 11:36:26 -02:00
Mauro Carvalho Chehab 4ae1839800 [media] tm6000: Use just one lock for devlist
This avoids a race condition

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 11:36:18 -02:00
Mauro Carvalho Chehab 06f08e3a4d [media] tm6000-alsa: fix some locking issues
Those locking issues affect tvtime, causing a kernel oops/panic, due to
a race condition.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 11:36:07 -02:00
Mauro Carvalho Chehab dc961136b9 [media] tm6000: don't use BKL at the driver
Instead, use core lock handling.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 11:35:25 -02:00
Mauro Carvalho Chehab c47d3e7f94 [media] Add a todo file for staging/tm6000
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 07:54:11 -02:00
Jarod Wilson 8be292cc03 [media] lirc: wire up .compat_ioctl to main ioctl handler
As pointed out (and tested) by Joris van Rantwijk, we do actually need
to wire up .compat_ioctl for 32-bit lirc userspace to work with 64-bit
lirc kernelspace. Do it. And add a check to make sure we get a valid
irctl in the ioctl handler.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:18:36 -02:00
Jarod Wilson a126681810 [media] staging/lirc: ioctl portability fixups
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:18:35 -02:00
Mauro Carvalho Chehab 589851d599 [media] V4L-DVB: tm6000: Move VBI init to a separate function
While here, documment that VBI may need changes, based on video STD, and
do some cleanup at device init, to be sure that VBI init will happen
all the times, and to remove a duplicated video standard call.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:17:53 -02:00
Dmitry Belimov 421d1b7071 [media] tm6000: Improve audio standards handling and add SECAM-DK
Rework audio. Add SECAM-DK, move SECAM to SECAM-B | SECAM-G.

Add some new audio standards and tricks for future, see
tm6000_set_audio_std.

For SECAM-DK it works.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:17:52 -02:00
Mauro Carvalho Chehab 709944eae2 [media] tm6000: add audio standards table
The better is to remove the audio init from tm6000-core and add a
separate per-standard set of tables.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:17:51 -02:00
Ruslan Pisarev e4115bb284 [media] Staging: cx25821: fix braces and space coding style issues
Errors found by the checkpatch.pl tool.

[mchehab@redhat.com: merged a series of CodingStyle cleanup patches for cx25851. They're all from the same author, and patches the same driver]
Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Cc: Palash Bandyopadhyay <Palash.Bandyopadhyay@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:17:08 -02:00
Ruslan Pisarev 01bc799186 [media] Staging: cx25821: remove spaces after parenthesis
fix "ERROR: space prohibited after that open parenthesis '('"

This is a patch to the cx25821-audio-upstream.h file that fixed up a
space errors found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:17:07 -02:00
Pete Eberlein a716e9d75f [media] go7007: MJPEG buffer overflow
The go7007 driver has a potential buffer overflow and pointer corruption
bug which causes a crash while capturing MJPEG. The motion detection
(MODET) active_map array can be overflowed by JPEG frame data that
emulates a MODET start code. The active_map overflow overwrites the
active_buf pointer, causing a crash.

The JPEG data that emulated MODET start code was being removed from the
output, resulting in garbled JPEG frames. Therefore ignore MODET start
codes when MODET is not enabled.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:17:03 -02:00
Mauro Carvalho Chehab 94d4350c54 [media] staging/tm6000: Fix a warning message
I added a code to the driver to force it to produce a warning. This
were intended to remind me about a very bad hack. I never found a way
to workaround. So, instead of those warnings:

drivers/staging/tm6000/tm6000-core.c: In function ‘tm6000_init_analog_mode’:
drivers/staging/tm6000/tm6000-core.c:328: warning: ISO C90 forbids mixed declarations and code

Let's document the issue and hope if someone with the support of the vendor
might fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:17:02 -02:00
Mauro Carvalho Chehab 2b361ab6d5 [media] lirc_igorplugusb: Fix a compilation waring
drivers/staging/lirc/lirc_igorplugusb.c: In function ‘usb_remote_probe’:
drivers/staging/lirc/lirc_igorplugusb.c:393: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘unsigned int’

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:17:01 -02:00
Mauro Carvalho Chehab be737a8269 V4L/DVB: tm6000: Fix warnings due to a small array size
drivers/staging/tm6000/tm6000-stds.c:101: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:101: warning: (near initialization for ‘tv_stds[0].common’)
drivers/staging/tm6000/tm6000-stds.c:160: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:160: warning: (near initialization for ‘tv_stds[1].common’)
drivers/staging/tm6000/tm6000-stds.c:219: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:219: warning: (near initialization for ‘tv_stds[2].common’)
drivers/staging/tm6000/tm6000-stds.c:336: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:336: warning: (near initialization for ‘tv_stds[4].common’)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:16:57 -02:00
Dmitri Belimov 73f4d265f6 V4L/DVB: tm6000+audio
I rework my last patch for audio and now audio works well. This patch
can be submited to GIT tree Quality of audio now is good for SECAM-DK.
For other standard I set some value from datasheet need some tests.

1. Fix pcm buffer overflow
2. Rework pcm buffer fill method
3. Swap bytes in audio stream
4. Change some registers value for TM6010
5. Change pcm buffer size

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:06:20 -02:00
Hans Verkuil 0e0809a588 V4L/DVB: videobuf: add queue argument to videobuf_waiton()
videobuf_waiton() must unlock and relock ext_lock if it has to wait.
For that to happen it needs the videobuf_queue pointer.

Don't attempt to unlock/relock q->ext_lock unless it was locked in the
first place.

vb->state has to be protected by a spinlock to be safe.

This patch is based on code from Mauro Carvalho Chehab <mchehab@redhat.com>.

[mchehab@redhat.com: add extra argument to a few missing places]
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:06:14 -02:00
Hans Verkuil 08bff03ed6 V4L/DVB: videobuf: add ext_lock argument to the queue init functions
Add an ext_lock argument to the videobuf init functions. This allows
drivers to pass the vdev->lock pointer (or any other externally held lock)
to videobuf. For now all drivers just pass NULL.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:06:14 -02:00
Mauro Carvalho Chehab 96322b80e2 V4L/DVB: Deprecate stradis driver
The driver author seems to not worked on this driver since its conversion
from 2.2 to 2.4. Nobody is known to have a stradis hardware for testing. As
it still uses V4L1 API, BKL and probably some other old stuff, someone would
need to work on it to preserve the driver. Instead of investing time and
efforts to keep porting it to work with new API's, it seems better to just
drop the driver.

So, let's move it to drivers/staging and label it to die at 2.6.38, if nobody
cares enough to port parallel port support to gspca or to create a new driver
that uses the same gspca-cpia sub-driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:06:13 -02:00
Mauro Carvalho Chehab 7af97effb3 V4L/DVB: Deprecate cpia driver (used for parallel port webcams)
cpia driver were re-written inside gspca driver, for USB devices. The only
functionality that were not migrated is the support for parallel port,
as:
	1) the developer didn't find any hardware;
	2) it doesn't  seem important to keep support for a parallel port webcam,
	   as this is an obsolete technology;
	3) the changes at gspca for it to work with parallel port would be very large;
	4) this driver still uses BKL.

So, let's move it to drivers/staging and label it to die at 2.6.38, if nobody
cares enough to port parallel port support to gspca or to create a new driver
that uses the same gspca-cpia sub-driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:06:13 -02:00
Mauro Carvalho Chehab d6c1ef6faa V4L/DVB: Fix Kconfig dependencies for VIDEO_IR
warning: (VIDEO_GO7007 && STAGING && !STAGING_EXCLUDE_BUILD && VIDEO_DEV && PCI && I2C && INPUT && BKL && SND || VIDEO_CX25821 && STAGING && !STAGING_EXCLUDE_BUILD && DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && BKL) selects VIDEO_IR which has unmet direct dependencies (IR_CORE)
warning: (VIDEO_CX25821 && STAGING && !STAGING_EXCLUDE_BUILD && DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && BKL) selects VIDEO_IR which has unmet direct dependencies (IR_CORE)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:06:10 -02:00
Hans Verkuil 8dd4eddaf7 V4L/DVB: tm6000: removed unused i2c adapter ID
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:06:05 -02:00
Hans Verkuil 22ac5f67a6 V4L/DVB: s2250: remove obsolete v4l2-i2c-drv.h header
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:06:04 -02:00
Mauro Carvalho Chehab f71d76812e V4L/DVB: cx25821: fix gcc warning when compiled with allyesconfig
drivers/staging/cx25821/cx25821-alsa.c:632: warning: ‘cx25821_audio_pci_tbl’ defined but not used

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:04:52 -02:00
Stefan Ringel 401ad27867 V4L/DVB: tm6000: bugfix param string
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:04:49 -02:00
Hans Verkuil c5e76a6d2a V4L/DVB: cx25821: convert to the mediabus API
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:04:40 -02:00
Hans Verkuil b8c75ed898 V4L/DVB: go7007: convert to use the mediabus API
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:04:39 -02:00
Greg Kroah-Hartman 150b19d430 Staging: hv: make get_channel_info static
This is done by moving it to the only .c file it is used in.

This also allowed us to delete the channel_interface.h file, as it's no
longer needed.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-20 16:07:11 -07:00
Greg Kroah-Hartman a4e91ed24b Staging: hv: vmbus_drv: remove vmbus_child_device_get_info
Just make the call to get_channel_info() directly.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-20 16:02:49 -07:00
Greg Kroah-Hartman e957bda0f4 Staging: hv: remove GetChannelInfo from struct vmbus_driver
It was only set to one value, so just make the call to
get_channel_info() directly.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-20 16:00:37 -07:00
Greg Kroah-Hartman 40bc5360d7 Staging: hv: remove GetInfo pointer from struct vmbus_channel_interface
It's only set by one thing, and never called.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-20 15:57:19 -07:00
Greg Kroah-Hartman ee00966818 Staging: hv: remove VmbusGetChannelInfo
It's not needed, make the function pointer point to get_channel_info()
instead.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-20 15:55:36 -07:00
Greg Kroah-Hartman 50fe56d248 Staging: hv: make alloc_channel static
It's only used in one file, and is a pretty generic name.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-20 15:51:57 -07:00
Andy Shevchenko 77099f0afe staging: batman-adv: remove useless addr_to_string()
Since all *printf() methods in the kernel understand '%pM' modifier the
conversion to the string is useless beforehand.

Additionally this patch decreases batman_if structure by 20 bytes.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Marek Lindner <lindner_marek@yahoo.de>
Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-20 15:48:40 -07:00
nohee ko cd389a34a1 staging: brcm80211: brcmfmac: add debugfs, display wi-fi statistics
Add debugfs to display wi-fi profile/statistics.
Initially some profile parameters such as dtim_period,
beacon_int will be seen at
/sys/kernel/debug/ieee80211/phy#/netdev:eth#.
This will provide users with current connection status.

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:54:52 -07:00
nohee ko 1e0645c323 staging: brcm80211: brcmfmac: add profile, beacon_int, dtim_period
Add profile, beacon_int & dtim_period.
This profile can be seen through debugfs.

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:54:52 -07:00
nohee ko c5ca038fa5 staging: brcm80211: brcmfmac: enable passive, active scan selection
Enable passive, active scan selection.
Previously it did active scan and reported
probe response result regardless of active_scan
flag

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:54:51 -07:00
nohee ko f49200c367 staging: brcm80211: brcmfmac: remove unnecessary cflags, WL_ISCAN_DISABLED & WL_ROAM_DISABLED
Remove unnecessary cflags, WL_ISCAN_DISABLED
and WL_ROAM_DISABLED. Iscan is ON and Roam by FW
is OFF by default.

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:54:51 -07:00
Gustavo Silva bd384c2722 Staging: frontier: fix coding style issues in tranzport.c
This is a patch to the tranzport.c file that fixes up the following issue

WARNING: please, no space for starting a line	x 23

Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:54:51 -07:00
Bob Beers c694ed85ea Staging: cxt1e1: multiple definition of max_mtu fix
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>
2010-10-19 10:12:14 -07:00
Vasiliy Kulikov b3495cebaa staging: speakup: fix memory leak
speakup_init() didn't free first_console if speakup_kobj_init() fails.
Also propagate speakup_kobj_init()'s return code.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:10:54 -07:00
Vasiliy Kulikov 6a56486716 staging: speakup: fix leaks of sysfs groups
speakup_kobj_init() and speakup_kobj_exit() didn't remove
i18n_attr_group and main_attr_group sysfs groups.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:10:13 -07: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 8e99c33d08 staging: ft1000: Remove dead code from ft1000_hw.c
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:08:50 -07:00
Marek Belisko 29437ab09f staging: ft1000: Get rid of using typedef.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:08:10 -07:00
William Hubbs a1277d85dc staging: speakup: varhandlers.c style fixes
fix issues reported by checkpatch.pl

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:06:05 -07:00
William Hubbs 7025005f15 staging: speakup: thread.c style fixes
fix issues reported by checkpatch.pl

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:06:05 -07:00
William Hubbs 1e560261b7 staging: speakup: synth.c style fixes
fix issues reported by checkpatch.pl

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:06:05 -07:00
William Hubbs baf9ac9ff8 staging: speakup: serialio.c style fixes
fix issues reported by checkpatch.pl

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:06:05 -07:00
William Hubbs a1768fbbd9 staging: speakup: selection.c style fixes
fix issues reported by checkpatch.pl

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:06:05 -07:00
William Hubbs 16d355156b staging: speakup: main.c style fixes
- fix issues reported by checkpatch.pl
- run code through Lindent
- move some prototypes to speakup.h

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:06:04 -07:00
William Hubbs f976520bee staging: speakup: i18n.c fix long lines
A help message had to be slightly reworded, but the meaning is the same.

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:06:04 -07:00
Andy Shevchenko 2b6d83d662 staging: wlags49_h2: remove useless DbgHwAddr() method
There is no needs to prepare string for MAC addresses beforehand, due to
kernel's *printf() have '%pM' format option.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:17 -07:00
Andy Shevchenko a113af9a35 staging: wlags49_h2: fix format of timeStamp debug output
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:17 -07:00
Marek Lindner 1bc80e9527 Staging: batman-adv: process OGMs bigger than MAX_AGGREGATION_BYTES
Reported-by: Sam Yeung <sam.cwyeung@gmail.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Marek Lindner 15f00687e3 Staging: batman-adv: fix crash when new OGM is generated
If aggregation is not enabled the local translation table can grow
much bigger and expects to fill a full ethernet packet.

Reported-by: Sam Yeung <sam.cwyeung@gmail.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Marek Lindner 24fb009bae Staging: batman-adv: protect against ogm packet overflow by checking table length
Reported-by: Sam Yeung <sam.cwyeung@gmail.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Marek Lindner 3c45603024 Staging: batman-adv: document fragmentation sysfs API
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Linus Lüssing 5dfa2ba9e6 Staging: batman-adv: Fix resizing of broadcast seqno buffers on if deletion
Not only the entries of the deleted interface got erased, but also all
ones with a lower if_num. This commit fixes this issue by setting the
destination appropriately.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Sven Eckelmann 9b37bc2c71 Staging: batman-adv: Don't dereference unchecked incoming soft_iface
send_packet derefenced forw_packet->if_incoming and checked if
forw_packet->if_incoming is NULL.

This cannot happen, but still makes irritates when reading through the
functions.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:16 -07:00
Sven Eckelmann 1ee600ced3 Staging: batman-adv: Add hash recommendations to TODO
David Miller <davem@davemloft.net> recommended in
20100924.134334.28812338.davem@davemloft.net that we must make the hash
abstraction helper more efficient and may remove it completely.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:04:15 -07:00
Justin P. Mattock 631dd1a885 Update broken web addresses in the kernel.
The patch below updates broken web addresses in the kernel

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Dimitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Acked-by: Ben Pfaff <blp@cs.stanford.edu>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Reviewed-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-10-18 11:03:14 +02:00
Dan Carpenter 388b2b97ba Staging: sst: more copy_to_user() changes
Vinod wanted the copy_to_user() calls in this format:
	if (copy_to_user())
		retval = -EFAULT;
instead of this:
	retval = copy_to_user();
	if (retval)
		retval = -EFAULt;

I've done that for the whole intel_sst_app_interface.c file.  In the
process I noticed a couple more places that returned -EBUSY or -EAGAIN
instead of -EFAULT.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 15:42:26 -07:00
Dan Carpenter 9f407840bb Staging: intel_sst: off by one bug
This should be >= instead of > or we go passed the end of the array.

Also the arrays are declared with size MAX_NUM_STREAMS.  This is the
only place that uses MAX_NUM_STREAMS_MFLD.  It seems like asking for
trouble to use two variables for the same information.  I've changed
everything to use MAX_NUM_STREAMS.

This bug isn't really harmful.  In the worst case, if you enabled
debugging then you would see a message.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 15:42:26 -07:00
Dan Carpenter 87b554a04a Staging: intel_sst: return -EFAULT if copy_to_user() fails
copy_to_user() returns the number of bytes remaining to be copied but we
want to return an error code.  And that error code is -EFAULT not -EIO.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 15:41:36 -07:00
Haiyang Zhang e98cb27681 staging: hv: Convert camel cased functions in channel_mgmt.c to lower case
Convert camel cased functions in channel_mgmt.c to lower case

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:45:30 -07:00
Haiyang Zhang 188963ec75 staging: hv: Convert camel cased local variable names in channel_mgmt.c to lower case
Convert camel cased local variable names in channel_mgmt.c to lower case

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:45:30 -07:00
Haiyang Zhang 277997032b staging: hv: Convert camel cased parameter in channel_interface.h to lower case
Convert camel cased parameter in channel_interface.h to lower case

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:45:30 -07:00
Haiyang Zhang 53e4f1e656 staging: hv: Convert camel cased function names in channel_interface.c to lower cases
Convert camel cased function names in channel_interface.c to lower cases

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:45:29 -07:00
Haiyang Zhang 9de050c420 staging: hv: Convert camel cased local variables in channel_interface.c to lower cases
Convert camel cased local variables in channel_interface.c to lower cases

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:45:29 -07:00
Julia Lawall cc58cbb885 staging: tidspbridge: Clean up error-handling code
In the first hunk, 0 is returned on memory allocation failure, even though
other failures return -ENOMEM or other similar values.

In the second hunk, there was error handling code that returned without
freeing psz_path_name.

A simplified version of the semantic match that finds the first problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression ret;
expression x,e1,e2,e3;
@@

ret = 0
... when != ret = e1
*x = \(kmalloc\|kcalloc\|kzalloc\)(...)
... when != ret = e2
if (x == NULL) { ... when != ret = e3
  return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:44:25 -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 78890fdb24 staging: ft1000: Use specific return error codes.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:41:35 -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 e09aee2a52 staging: ft1000: Remove DRVMGS typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:39:26 -07:00
Marek Belisko b13e39b2f7 staging: ft1000: Remove PSEUDO_HDR typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:30:39 -07:00
Marek Belisko e27d96dd9c staging: ft1000: Remove PROV_RECORD typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:27:05 -07:00
Marek Belisko 151adba757 staging: ft1000: Remove APP_INFO_BLOCK typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:27:05 -07:00
Marek Belisko 369e857e96 staging: ft1000: Remove DSPINITMSG typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:27:05 -07:00
Marek Belisko 1b8a301217 staging: ft1000: Remove MEDIAMSG typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:27:04 -07:00
Marek Belisko 7dc5911599 staging: ft1000: Remove unused function ft1000_hbchk()
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:26:37 -07:00
Dan Carpenter 81a2fff67a Staging: intel_sst: cleanup naming a little
&sst_drv_ctx->streams[str_id].lock and &stream->lock are the same.
The mutex_lock() uses &stream->lock so this makes things consistent and
it's nicer to read as well.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:24:39 -07:00
Dan Carpenter 1055cc99bd Staging: ft1000-usb: use the correct list head
Using pdpram_blk here would cause an oops.  We intended to use
&freercvpool.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Tested by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:24:39 -07:00
Dan Carpenter 79e7c561ae Staging: lirc: fix PTR_ERR() check
This is a typo.  It's supposed to be IS_ERR() here instead of PTR_ERR().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:24:39 -07:00
Dan Carpenter fcbf77bf87 Staging: ft1000-usb: fix array overflow
The code here is supposed checking if we exited the loop without hitting
a break.  The problem is that in the error handling "i" is out of bounds
and it corrupts memory when we do an info->app_info[i].nRxMsgMiss++.
>From the comments, it looks like someone noticed this corruption and
updated the code, but didn't totally fix the problem.  The correct fix
is just to remove nRxMsgMiss++ from the error path.

I believe this bug can be triggered remotely.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:24:38 -07:00
Christopher Brannon 4073f1b6ab staging: speakup: speakup_dectlk.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Replace a function-like macro with an inline function.
* Remove an incorrect use of the volatile qualifier.  The
previously-volatile variable is now always protected by a spinlock.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:38 -07:00
Christopher Brannon c3d5d98820 staging: speakup: speakup_txprt.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:38 -07:00
Christopher Brannon 0d42cfe4c1 staging: speakup: speakup_spkout.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:38 -07:00
Christopher Brannon 13f1a041ac staging: speakup: speakup_soft.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Make the file_operations structure const.
* Use strict_strtoul instead of simple_strtoul.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:37 -07:00
Christopher Brannon e66c3d8475 staging: speakup: speakup_ltlk.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Remove an unused function-like macro.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:37 -07:00
Christopher Brannon 75d6282d8b staging: speakup: speakup_keypc.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Eliminate the unused synth_readable macro.
* Convert function-like macros to inline functions.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:37 -07:00
Christopher Brannon 9d096afa06 staging: speakup: speakup_dummy.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:37 -07:00
Christopher Brannon 2c9e0cb07f staging: speakup: speakup_dtlk.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Replace function-like macros with inline functions.
* Simplify some boolean expressions.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon 227e18d6b6 staging: speakup: speakup_decpc.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon 3d4f7eaf65 staging: speakup: speakup_decext.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Replace function-like macros with inline macros.
* Eliminate a use of the ternary operator, for readability.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon 64d1e5a098 staging: speakup: speakup_bns.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon d1c07c416c staging: speakup: speakup_audptr.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon f4931441ae staging: speakup: speakup_apollo.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:35 -07:00
Christopher Brannon 28ba8677bc staging: speakup: speakup_acntsa.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Eliminate an unused function-like macro.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:35 -07:00
Christopher Brannon bf4a4bacb0 staging: speakup: speakup_acntpc.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Eliminate the unused synth_readable macro.
* Convert function-like macros to inline functions.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:35 -07:00
Arnd Bergmann 6038f373a3 llseek: automatically add .llseek fop
All file_operations should get a .llseek operation so we can make
nonseekable_open the default for future file operations without a
.llseek pointer.

The three cases that we can automatically detect are no_llseek, seq_lseek
and default_llseek. For cases where we can we can automatically prove that
the file offset is always ignored, we use noop_llseek, which maintains
the current behavior of not returning an error from a seek.

New drivers should normally not use noop_llseek but instead use no_llseek
and call nonseekable_open at open time.  Existing drivers can be converted
to do the same when the maintainer knows for certain that no user code
relies on calling seek on the device file.

The generated code is often incorrectly indented and right now contains
comments that clarify for each added line why a specific variant was
chosen. In the version that gets submitted upstream, the comments will
be gone and I will manually fix the indentation, because there does not
seem to be a way to do that using coccinelle.

Some amount of new code is currently sitting in linux-next that should get
the same modifications, which I will do at the end of the merge window.

Many thanks to Julia Lawall for helping me learn to write a semantic
patch that does all this.

===== begin semantic patch =====
// This adds an llseek= method to all file operations,
// as a preparation for making no_llseek the default.
//
// The rules are
// - use no_llseek explicitly if we do nonseekable_open
// - use seq_lseek for sequential files
// - use default_llseek if we know we access f_pos
// - use noop_llseek if we know we don't access f_pos,
//   but we still want to allow users to call lseek
//
@ open1 exists @
identifier nested_open;
@@
nested_open(...)
{
<+...
nonseekable_open(...)
...+>
}

@ open exists@
identifier open_f;
identifier i, f;
identifier open1.nested_open;
@@
int open_f(struct inode *i, struct file *f)
{
<+...
(
nonseekable_open(...)
|
nested_open(...)
)
...+>
}

@ read disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
<+...
(
   *off = E
|
   *off += E
|
   func(..., off, ...)
|
   E = *off
)
...+>
}

@ read_no_fpos disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
... when != off
}

@ write @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
<+...
(
  *off = E
|
  *off += E
|
  func(..., off, ...)
|
  E = *off
)
...+>
}

@ write_no_fpos @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
... when != off
}

@ fops0 @
identifier fops;
@@
struct file_operations fops = {
 ...
};

@ has_llseek depends on fops0 @
identifier fops0.fops;
identifier llseek_f;
@@
struct file_operations fops = {
...
 .llseek = llseek_f,
...
};

@ has_read depends on fops0 @
identifier fops0.fops;
identifier read_f;
@@
struct file_operations fops = {
...
 .read = read_f,
...
};

@ has_write depends on fops0 @
identifier fops0.fops;
identifier write_f;
@@
struct file_operations fops = {
...
 .write = write_f,
...
};

@ has_open depends on fops0 @
identifier fops0.fops;
identifier open_f;
@@
struct file_operations fops = {
...
 .open = open_f,
...
};

// use no_llseek if we call nonseekable_open
////////////////////////////////////////////
@ nonseekable1 depends on !has_llseek && has_open @
identifier fops0.fops;
identifier nso ~= "nonseekable_open";
@@
struct file_operations fops = {
...  .open = nso, ...
+.llseek = no_llseek, /* nonseekable */
};

@ nonseekable2 depends on !has_llseek @
identifier fops0.fops;
identifier open.open_f;
@@
struct file_operations fops = {
...  .open = open_f, ...
+.llseek = no_llseek, /* open uses nonseekable */
};

// use seq_lseek for sequential files
/////////////////////////////////////
@ seq depends on !has_llseek @
identifier fops0.fops;
identifier sr ~= "seq_read";
@@
struct file_operations fops = {
...  .read = sr, ...
+.llseek = seq_lseek, /* we have seq_read */
};

// use default_llseek if there is a readdir
///////////////////////////////////////////
@ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier readdir_e;
@@
// any other fop is used that changes pos
struct file_operations fops = {
... .readdir = readdir_e, ...
+.llseek = default_llseek, /* readdir is present */
};

// use default_llseek if at least one of read/write touches f_pos
/////////////////////////////////////////////////////////////////
@ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read.read_f;
@@
// read fops use offset
struct file_operations fops = {
... .read = read_f, ...
+.llseek = default_llseek, /* read accesses f_pos */
};

@ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write.write_f;
@@
// write fops use offset
struct file_operations fops = {
... .write = write_f, ...
+	.llseek = default_llseek, /* write accesses f_pos */
};

// Use noop_llseek if neither read nor write accesses f_pos
///////////////////////////////////////////////////////////

@ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
identifier write_no_fpos.write_f;
@@
// write fops use offset
struct file_operations fops = {
...
 .write = write_f,
 .read = read_f,
...
+.llseek = noop_llseek, /* read and write both use no f_pos */
};

@ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write_no_fpos.write_f;
@@
struct file_operations fops = {
... .write = write_f, ...
+.llseek = noop_llseek, /* write uses no f_pos */
};

@ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
@@
struct file_operations fops = {
... .read = read_f, ...
+.llseek = noop_llseek, /* read uses no f_pos */
};

@ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
@@
struct file_operations fops = {
...
+.llseek = noop_llseek, /* no read or write fn */
};
===== End semantic patch =====

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Julia Lawall <julia@diku.dk>
Cc: Christoph Hellwig <hch@infradead.org>
2010-10-15 15:53:27 +02:00
mike.rapoport@gmail.com da6830ac39 staging: brcm80211: remove unrefrenced malloced field
from 'struct osl_info' structure

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:30:01 -07:00
mike.rapoport@gmail.com 182acb3ca5 staging: brcm80211: replace MFREE with kfree
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:29:56 -07:00
mike.rapoport@gmail.com 199d217c52 staging: brcm80211: remove unused NATIVE_{MALLOC,MFREE}
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:29:22 -07:00
mike.rapoport@gmail.com 5fcc1fcb2e staging: brcm80211: replace MALLOC() with k[zm]alloc
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:28:58 -07:00
mike.rapoport@gmail.com 97e17d0e7b staging: brcm80211: remove osl_malloced()/MALLOCED()
because there are other means to track memory leaks in kernel

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:28:18 -07:00
mike.rapoport@gmail.com 6a92fdf1b9 staging: brcm80211: remove DHD_USE_STATIC_BUF
The DHD_USE_STATIC_BUF cannot be enabled in the build configuration,
remove it.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:27:50 -07:00
Greg Kroah-Hartman 6ddcfdcf91 Staging: brcm80211: fix up compiler warnings I created
I messed up on some of the uintptr conversions, this fixes them up
properly.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:26:08 -07:00
mike.rapoport@gmail.com 7383141b03 staging: brcm80211: remove OSL_DELAY
and use udelay and mdelay instead

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:24:35 -07:00
nohee ko 5dc56c9f4c staging: brcm80211: brcmfmac: bug fix - scan result report
Scan result was reported with some duplicated information.
Those were about SSID/ rate. With this patch, the duplication
can be erased.

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:21:53 -07:00
nohee ko 7356f429d2 staging: brcm80211: brcmfmac: replace KILL_PROC with send_sig()
logic optimization : replace KILL_PROC with send_sig()

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:21:52 -07:00
Brett Rudley 4c71ebf4da staging: brcm80211: Purge unused bcmwpa.[ch]
Move two macros into wlc_mac80211.h and purge the rest.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:20:49 -07:00
Randy Dunlap 0a652b9628 staging: speakup: fix printk format warning
Fix printk format warning:

drivers/staging/speakup/serialio.c:44: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: <speakup@braille.uwo.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:14:10 -07:00
Bernhard Walle 6566961fcb staging: octeon: Remove USB code
Remove functions and definitions that refer to USB since the driver
doesn't support USB and it's not planned to add USB support to that
driver. So the code is just dead code which can be removed.

Cc: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Bernhard Walle <walle@corscience.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:14:09 -07:00
Marek Belisko 310bad04ec staging: ft1000: Use specific error return value.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:11:25 -07:00
Marek Belisko f9d173736b staging: ft1000: Get rid of using atoi.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:11:25 -07:00
Alan Cox 83cb1926e0 staging: sst: Remove the aava bits
We don't need these special cases any more.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:11:24 -07:00
Vinod Koul 88eea8de94 staging: sst: remove the kernel locking in ioctl
kernel locking in ioctl was introduced when ioctl function was
moved from ioctl to unlocked ioctl
This is no longer required hence removed

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:11:24 -07:00
Marek Belisko 6e2c2dcfa4 staging: ft1000: remove dead code.
was #ifdef so remove code which was under #else to make
code more readable.

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 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
Michael Hennerich 2a28f6cb74 staging: iio: ad7476: fix !CONFIG_IIO_RING_BUFFER build issue reported by Randy Dunlap
Fix function function decalration
Enable CONFIG_IIO_RING_BUFFER for the ad7476 driver

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:09:23 -07:00
nohee ko af73713642 staging: brcm80211: bug fix- rmmod hang problem
Bug fix - rmmod hang problem.
Can keep both of kthread & down_interruptible.
And in the meantime, can terminate the threads
properly during rmmod process.

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 14:07:45 -07:00
Greg Kroah-Hartman c11b0ef8fe Staging: brcm80211: remove sbpciregs_t typedef
don't use a typedef, use a 'struct'.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 14:04:26 -07:00
Greg Kroah-Hartman 3c2c926823 Staging: brcm80211: util: remove unneeded use of uintptr
uintptr shouldn't be used when you are just casting to a pointer anyway,
so remove it from these usages.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 13:20:38 -07:00
Greg Kroah-Hartman e88cf8eb62 Staging: brcm80211: sys: remove unneeded use of uintptr
uintptr shouldn't be used when you are just casting to a pointer anyway,
so remove it from these usages.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 13:20:19 -07:00
Greg Kroah-Hartman 159a3b78f9 Staging: brcm80211: phy: remove unneeded use of uintptr
uintptr shouldn't be used when you are just casting to a pointer anyway,
so remove it from these usages.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 13:20:00 -07:00
Greg Kroah-Hartman 3acf41c5c9 Staging: brcm80211: include: remove unneeded use of uintptr
uintptr shouldn't be used when you are just casting to a pointer anyway,
so remove it from these usages.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 13:18:17 -07:00
Greg Kroah-Hartman ec1284e104 Staging: brcm80211: bcmsdpcm: remove a bunch of unused macros
These direct memory reading macros are not being used, so remove them.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 13:04:58 -07:00
Greg Kroah-Hartman 0965ae88af Staging: brcm80211: remove FALSE #define
use the kernel provided 'false' value instead, especially
as we are using a 'bool' for these variables.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 12:50:15 -07:00
Greg Kroah-Hartman 0f0881b090 Staging: brcm80211: remove TRUE #define
use the kernel provided 'true' value instead, especially
as we are using a 'bool' for these variables.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 12:15:18 -07:00
William Hubbs f1c6b7fb70 staging: speakup: kobjects.c: style fixes
clean upd this file based on reports from checkpatch.pl

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 10:50:42 -07:00
William Hubbs 09adcb52a6 staging: speakup: keyhelp.c: style fixes
Clean up this file based on reports from checkpatch.pl.

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 10:50:42 -07:00
William Hubbs d09d3e2cdd staging: speakup: i18n.c: style fixes
Clean up this file based on reports from checkpatch.pl.

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 10:50:41 -07:00
William Hubbs 29644b22da staging: speakup: devsynth.c: style fixes
clean up this file based on reports from checkpatch.pl.

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 10:50:41 -07:00
Hank Janssen 99c8da0f4f staging: hv: Doubled ringbuffer size for Hyper-v network driver
Double the default network ringsize buffer for Hyper-V network driver.
In very heavily loaded systems the there is a chance you run out of
ringbuffer space and error out.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 10:50:41 -07:00
Marek Belisko 13da8f0d46 staging: ft1000: get rid of typedef usage.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 09:05:54 -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
Andy Shevchenko a252d02f89 staging: wlags49_h2: remove custom macros min() and max()
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 09:03:30 -07:00
Andy Shevchenko 97eea3afa2 staging: rt2860: remove custom min() and max()
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 09:03:29 -07:00
Andy Shevchenko ba07d0cbc9 staging: brcm80211: remove useless bcm_ether_ntoa()
Since we have '%pM' modifier in the kernel's *printf() we don't need to
convert address to the string beforehand.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Nohee Ko <noheek@broadcom.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: linux-wireless@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 09:03:29 -07:00
nohee ko 88b3eaa499 staging: brcm80211: remove duplicated function, wf_channel2mhz
remove duplicated function, wf_channel2mhz

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 09:03:28 -07:00
Michael Hennerich 1139df5353 staging: iio: adc: ad799x miscellaneous cleanups
-Simplify by using iio_alloc_pollfunc helper function
-Print in_scale in decimal format.
-Simplify ring pointer dereferences

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 08:59:32 -07:00
Michael Hennerich 668413e9e7 staging: iio: adc: ad7476 more list review feedback by Jonathan Cameron
Print in_scale in decimal format.
Kconfig list the names of the parts in full, to ease seraching.
Use st->spi in the call as it is only used the once.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 08:59:32 -07:00
Michael Hennerich 349282d82e staging: iio: adc: ad7476 new SPI ADC driver
New driver handling:
	AD7475, AD7476, AD7477, AD7478, AD7466, AD7467, AD7468, AD7495
SPI micropower and high speed 12-/10-/8-Bit ADCs

staging: iio: adc: ad7476 apply list review feedback by Jonathan Cameron

Changes since last RFC post V1:
	Mainly list review feedback by Jonathan Cameron

-Remove scan_attrs from chip info structure.
-Remove name from chip info structure, use new spi_device_id instead.
-Allow transfer buffers to live in their own cache lines, to avoid DMA/cache coherency issues.
-Move scan el code into the ring buffer file.
-Use helper function to alloc the pollfunc.
-Use regulator framework and get vref_mv from the regulator in case not specified by pdata.
-Devices with buit-in reference use vref from the chip info structure
-Don't error on missing platform_data

-Make vref_mv type unsigned short
-Print in_scale "Vref / 2^(bits)" if fractional.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 08:59:31 -07:00
Randy Dunlap 1dd8b73227 staging: intel_sst: include delay.h to fix build error
intel_sst_drv_interface.c uses msleep() so it needs to include delay.h:

drivers/staging/intel_sst/intel_sst_drv_interface.c:88: error: implicit declaration of function 'msleep'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 08:55:40 -07:00
Jason Cooper a9d0fffa93 staging: brcm80211: remove BCMNMIATTACHFN() macro.
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 08:52:29 -07:00
Jason Cooper 9927fc2eab staging: brcm80211: remove BCMUNINITFN() macro.
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 08:52:28 -07:00
Jason Cooper b4f790eeb3 staging: brcm80211: remove BCMINITFN() macro.
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 08:52:28 -07:00
Jason Cooper 2184ccb9f7 staging: brcm80211: remove BCMINITDATA() macro.
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 08:52:13 -07:00
Jason Cooper eeb8e46b50 staging: brcm80211: fix various checkpatch errors.
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 08:51:55 -07:00
Jason Cooper 94dc5e7780 staging: brcm80211: s/unsigned char/size_t/ for min_t()
Avoid potential truncation.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-11 15:06:43 -07:00
Andy Shevchenko d5642d3ba7 staging: brcm80211: remove custom string library again
There was a clean up commit for softmac driver. Do the same for fullmac
implementation.

Here:
 - strtoul and bcm_strtoul are changed to simple_strtoul
 - bcmstrtok -> strsep

All unused functions are deleted.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-11 15:02:30 -07:00
Andy Shevchenko 41c7f4167e staging: brcm80211: clean up custom ctype library again
The similar cleanup was done before for softmac implementation.  But the
fullmac driver brings this back. Remove it again.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-11 15:02:29 -07:00
Tracey Dent d7cf430c54 Staging: speakup: i18n.c: cleaned up file
Cleaned up file with the use of checkpatch.pl.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-11 15:02:29 -07:00
Vasiliy Kulikov 801089e68e staging: intel_sst: use signed int for error codes
As retval stores error code, it should be signed int.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-10 11:25:00 -07:00
Vasiliy Kulikov 7915c0d4d2 staging: intel_sst: fix signess error
str_id was unsigned, so check for (str_id <= 0) made no sense.
Made it signed.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-10 11:25:00 -07:00
Vasiliy Kulikov 2dff527957 staging: tidspbridge: fix signess error
i was unsigned, so check for (i < 0) made no sense.  Made it signed.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-10 11:25:00 -07:00
Jason Cooper 53e974db65 staging: brcm80211: fix 'comparison..cast' compiler warnings.
Use min_t() macro instead of min().

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-10 11:24:59 -07:00
Greg Kroah-Hartman a6cf450e02 Staging: brcm80211: remove __cplusplus markers
It's not needed within the kernel, so remove them.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-10 05:52:59 -07:00
Jason Cooper 22b564b0b6 staging: brcm80211: remove BLOCKABLE so no one uses it.
BLOCKABLE() doesn't do what it's supposed to.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-10 05:39:51 -07:00
Jason Cooper 7716314bf9 staging: brcm80211: remove kernel_thread() for wl_iscan_thread and wl_event_thread.
Replace kernel_thread() with kthread_run().  Replace pid with tsk,
and exited with kthread_stop()/kthread_should_stop().

event_tsk, and tsk are NULL when their respective threads are not running.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-10 05:39:51 -07:00
Jason Cooper 5e2773ea93 staging: brcm80211: remove kernel_thread() for _iscan_sysioc_thread.
Replace kernel_thread() with kthread_run, kthread_stop() and
kthread_should_stop().  Remove sysioc_pid, sysioc_exit, and DAEMONIZE.

sysioc_tsk is NULL when not running.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-10 05:39:50 -07:00
Jason Cooper d809dcb9df staging: brcm80211: remove kernel_thread() for _dhd_sysioc_thread.
Replaced kernel_thread() with kthread_run(), kthread_stop(), and
kthread_should_stop().  Also removed all references to sysioc_pid and
sysioc_exit.  DAEMONIZE removed because not used in dhd_linux.c.

sysioc_tsk is NULL when not running.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-10 05:39:49 -07:00
Jason Cooper ecd7559d8d staging: brcm80211: remove kernel_thread() for dhd_dpc_thread.
use kthread_run(), kthread_stop(), and kthread_should_stop().  Removes
dpc_pid, dpc_exited, and the call to DAEMONIZE.

dpc_tsk is NULL when not running.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-10 05:39:48 -07:00
Jason Cooper 860708d9c8 staging: brcm80211: remove kernel_thread() for dhd_watchdog_thread.
Replaced kernel_thread() with kthread_run().  Used kthread_should_stop()
in place of watchdog_exited completion.  Replaced watchdog_pid with
struct task_struct.

watchdog_tsk is NULL when the task is not running.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-10 05:39:47 -07:00
nohee ko 839fad996b staging: brcm80211: remove unnecessary cflag, LINUX
remove unnecessary cflag, LINUX

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-09 13:49:43 -07:00
nohee ko 1e8dd5b9b3 staging: brcm80211: remove unnecessary cflag, CONFIG_CFG80211
remove unnecessary cflag, CONFIG_CFG80211

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-09 13:49:42 -07:00
nohee ko 5e33a02ff7 staging: brcm80211: remove unnecessary cflag, BCMWPA2
remove unnecessary cflag, BCMWPA2.
BCMDRIVER is already not used.

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-09 13:49:42 -07:00
nohee ko ea3b8a2810 staging: brcm80211: remove duplicated file, bcmutils.c
Remove duplicated file, bcmutils.c under brcm80211/brcmfmac.
brcm80211/util/bcmutils.c will be shared between softmac
& fullmac. Makefile, and some other files are also modified
accordingly

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-09 13:49:41 -07:00
Arnd Bergmann 9b24b8f941 staging: tidspbridge: add memory consistency to TODO list
This driver uses ioremap on regular memory to get an uncached mapping,
which causes problems on ARMv6 and higher due to aliasing with the
cached linar kernel mapping.

Make sure this gets fixed before the driver graduates from staging.

Cc: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-09 13:49:41 -07:00
Dan Carpenter cbf6baac77 Staging: brcm80211: make interface name buffer smaller
In the original code the interface name was IFNAMSIZ + 1, but that
caused problems in dhd_ifname2idx() which does:
	strncmp(dhd->iflist[i]->name, name, IFNAMSIZ)

The wl_event_msg_t struct can only store 16 character names as well.

And thirdly there is a potential buffer overflow in dhd_op_if() because
if->net->name is IFNAMSIZ and we do:
	strcpy(ifp->net->name, ifp->name);

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-09 13:49:40 -07:00
Greg Kroah-Hartman cf10700bf8 Staging: phison: fix problem caused by libata change
The libata core changed this function so it needed to call a different
one.

See https://bugzilla.kernel.org/show_bug.cgi?id=19872 for details.

Reported-by: Heinz Wiesinger <HMWiesinger@gmx.at>
Tested-by: Heinz Wiesinger <HMWiesinger@gmx.at>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-09 13:26:12 -07:00
Brett Rudley edae01b94a staging: brcm80211: Purge unused wlc_id_name
Purge unused wlc_id_name_entry

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 19:53:11 -07:00
Brett Rudley a9a6073c51 staging: brcm80211: Purge unused packet engine
We're not using the packet engine anymore - goodbye.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 19:53:10 -07:00
nohee ko fb693a712c staging: brcm80211: bug fix- dual band problem
Bug fix for dual band problem. In particular it had an issue
to connect to 5G band AP.

Signed-off-by: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 19:53:10 -07:00
Tracey Dent ef999f10a6 Staging: speakup: serialio: Fixed errors in file
On line 40 printk() needed an KERN_* facility level, so I gave it
INFO. Also, fixed a C99 comment error.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 19:49:26 -07:00
Brett Rudley 40e5c96b22 staging: brcm80211: Coalesce osl_dma_alloc_consistent between fullmac and softmac
Combine dma_alloc routine for full and softmac

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 14:32:52 -07:00
Brett Rudley 17b313857d staging: brcm80211: Purge unused memlist debugging
Purge unused memlist debugging

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 14:29:43 -07:00
Greg Kroah-Hartman 0d2f0724a4 Staging: brcm80211: remove BCMATTACHFN macro
It's not doing anything and is a bit silly.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 14:28:21 -07:00
Greg Kroah-Hartman 17c4da1ecf Staging: brcm80211: remove BCMATTACHDATA macro
It's not even used for anything, not to mention, it is pretty silly.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 14:11:20 -07:00
Greg Kroah-Hartman b61640d1ac Staging: brcm80211: brcmfmac: fix some comparison warnings
Use min_t() instead of min() in some places to make the
comparison explicit and resolve some compiler warnings.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 12:37:39 -07:00
Greg Kroah-Hartman a300ce95e4 Staging: brcm80211: sys: fix some comparison warnings
Use min_t() instead of min() in some places to make the
comparison explicit and resolve some compiler warnings.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 12:28:02 -07:00
Greg Kroah-Hartman 697d600d8f Staging: brcm80211: sys: wlc_ampdu: fix some comparison warnings
Use min_t() instead of min() in some places to make the comparison
explicit and resolve some compiler warnings.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 12:25:23 -07:00
Greg Kroah-Hartman e9e6727fcc Staging: brcm80211: phy: wlc_phy_n: fix some comparison warnings
Use min_t() instead of min() in some places to make the comparison
explicit and resolve some compiler warnings.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.d
2010-10-08 12:16:08 -07:00
Greg Kroah-Hartman c09cc58692 Staging: brcm80211: hnddma.c: fix compiler warning
Change the field types of dma_info_t to make comparing values easier
(and correct.)  No need to keep rxbufsize as a u16, it can be an
unsigned int to make things easier.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 12:07:33 -07:00
Greg Kroah-Hartman 96e76e6941 Staging: brcm80211: remove VALID_MASK macro
No one is using it.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 12:01:30 -07:00
Greg Kroah-Hartman e18d5313c6 Staging: brcm80211: remove ROUNDUP macro
And use the kernel provided 'roundup' instead.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 11:59:06 -07:00
Greg Kroah-Hartman 36c63ff6af Staging: brcm80211: remove ISALIGNED macro
And use the kernel provided IS_ALIGNED one instead.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 11:55:40 -07:00