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

55032 Commits

Author SHA1 Message Date
Bernd Porr f47c697d13 Staging: comedi: add usb usbduxfast driver
ITL USB-DUXfast driver

From: Bernd Porr <BerndPorr@f2s.com>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:19 -08:00
Bernd Porr 4bf21fa4da Staging: comedi: add usb usbdux driver
University of Stirling USB DAQ & INCITE Technology Limited driver.

From: Bernd Porr <BerndPorr@f2s.com>
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:19 -08:00
David Schleef bede729096 Staging: comedi: add mite comedi pci driver
Hardware driver for NI Mite PCI interface chip

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:19 -08:00
David Schleef a9f23e00c1 Staging: comedi: comedi driver common function module
This module is shared by many comedi drivers.

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:18 -08:00
David Schleef 94ab11c227 Staging: comedi: add pci and usb wrapper header files
This are used by usb and pci comedi drivers to handle the different
kernel versions.  They will be eventually removed, but are needed now
to be able to add comedi drivers to the tree.

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:18 -08:00
David Schleef 74b847f4d0 Staging: comedi: add local copy of interrupt.h
This is needed for some internal comedi driver macros that were
built up over the years to handle multiple kernel versions.  It will be
removed eventually.

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:18 -08:00
Greg Kroah-Hartman 84c9dc212a Staging: comedi: set up infrastructure for individual drivers
This adds two "generic" Kconfig options, one for PCI and one for USB
comedi drivers, and the Makefile infrastructure as well.  This is so
we can start adding individual comedi drivers and add them to the build
properly.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: David Schleef <ds@schleef.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:17 -08:00
David Schleef b79a7a2089 Staging: comedi: add kcomedilib to the tree
This adds the kcomedilib module

From: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:17 -08:00
Greg Kroah-Hartman 02ebd471ea Staging: comedi: fix build error in comedilib.h
If anyone included this file, it would break the build.
This patch fixes the issue.

Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:17 -08:00
Greg Kroah-Hartman 476b847733 Staging: comedi: fix checkpatch.pl errors in comedi_fops.c
There are still some >80 character lines in there, but
this catches the majority of the issues.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: David Schleef <ds@schleef.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:16 -08:00
Greg Kroah-Hartman e0dcef71f6 Staging: comedi: fix up a lot of checkpatch.pl warnings
Only clean up some of the easier ones in the .h files

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: David Schleef <ds@schleef.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:16 -08:00
David Schleef ed9eccbe89 Staging: add comedi core
This adds the Comedi core to the staging tree.
This is a data acquision infrastructure for Linux, providing a common
interface for these types of drivers.

Taken directly from the comedi git tree, with only minor tweaks
by Greg to get it to build properly within the kernel tree.

From: David Schleef <ds@schleef.org>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:16 -08:00
Sathya Perla 535deaa35e Staging: benet: cleanup a check while posting rx buffers
This patch cleans up the way to check if there is enough space in the rx_q
while posting buffers.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:16 -08:00
Sathya Perla a9acfa42bf Staging: benet: fix problems reported by checkpatch
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:16 -08:00
Sathya Perla 998c15b148 Staging: benet: patch to use offsetof() instead of AMAP_BYTE_OFFSET()
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:15 -08:00
Greg Kroah-Hartman 2a5a19caa0 Staging: benet: fix build error.
udelay() was not being defined properly, this patch fixes it.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Subbu Seetharaman <subbus@serverengines.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:15 -08:00
Sathya Perla d6258716b5 Staging: benet: fix build errors when CONFIG_NETPOLL is off
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:15 -08:00
Sathya Perla 7f4252318d Staging: benet: patch to remove subdirectories
Here's a patch tp remove the subdirectories in staging/benet (1st item in
staging/benet/TODO).

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:15 -08:00
Greg Kroah-Hartman 2774de17ba Staging: benet: build is broken unless CONFIG_NETPOLL is enabled
So disable the driver in that build situation and document
that this needs to be fixed.

Cc: Subbu Seetharaman <subbus@serverengines.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:15 -08:00
Greg Kroah-Hartman 0252e5c691 Staging: benet: fix up netdev->priv change
netdev->priv is now gone, so fix up all of the build errors in the benet
driver due to this change.

Cc: Subbu Seetharaman <subbus@serverengines.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:14 -08:00
Greg Kroah-Hartman 85e468cd55 Staging: benet: fix netif api breakage
The netif_rx_complete() and netif_rx_schedule() functions have changed,
so fix up the build breakage in the benet driver.

Cc: Subbu Seetharaman <subbus@serverengines.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:14 -08:00
Subbu Seetharaman 479e2f445f Staging: Add ServerEngines benet 10Gb ethernet driver
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:14 -08:00
Greg Kroah-Hartman 127ce13cee Staging: rt2860: enable WPA_SUPPLICANT support
This is needed in order to get NetworkManager to work properly
with this driver.

More details can be found at
	https://bugzilla.novell.com/show_bug.cgi?id=437959

Cc: Helmut Schaa <hschaa@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:12 -08:00
Greg Kroah-Hartman 26f0bcd1cf Staging: rt2860: Fix minor compiler warnings
The build is "clean" now for this driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:12 -08:00
J.R. Mauro 834e625578 Staging: rt2860: use standard bit-reverse function
Make the rt2860 use standard bit-reversing functions

Signed-off by: J.R. Mauro <jrm8005@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:12 -08:00
Greg Kroah-Hartman 739b797941 Staging: rt2860: fix up netdev->priv usage
Now that netdev->priv is removed, fix the driver to use netdev->ml_priv
like it always should have been doing.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:12 -08:00
Greg Kroah-Hartman 1872796327 Staging: rt2860: disable root hack for reading files
We are now using credentials, so just blindly setting the fsuid and
fsguid isn't acceptable.  All this means is that the config file needs
to be readable by the driver thread, not a big deal.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:11 -08:00
Greg Kroah-Hartman 9198099052 Staging: add rt2860 wireless driver
This is the Ralink RT2860 driver from the company that does horrible
things like reading a config file from /etc.  However, the driver that
is currently under development from the wireless development community
is not working at all yet, so distros and users are using this version
instead (quite common hardware on a lot of netbook machines).

So here is this driver, for now, until the wireless developers get a
"clean" version into the main tree, or until this version is cleaned up
sufficiently to move out of the staging tree.

Ported to the Linux build system and cleaned up a bit already by me.

Cc: Linux wireless <linux-wireless@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:11 -08:00
Alexander Beregalov f4f85ff725 Staging: otus: remove dependence on kernel version
Dependence on kernel version is not needed anymore
if we are in mainline now.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:11 -08:00
Greg Kroah-Hartman 707eefb8ee Staging: otus: fix urb callback function type
The #ifdef for version checking is wrong, and we no longer
pass the struct pt_regs to the urb callback functions.  This
patch fixes this error.

Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:10 -08:00
J.R. Mauro 063e95c736 Staging: otus: fix name clash
Make p80211wext_handler_def in the otus driver static. It's not used outside
this file and causes name clashes if it's visible.

Signed-off by: J.R. Mauro <jrm8005@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:10 -08:00
Greg Kroah-Hartman da3e89082d Staging: otus: fix netdev->priv usage
Now that netdev->priv is gone, fix things up properly in the otus driver
to use ml_priv as it should have always been doing.

Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:10 -08:00
Luis R. Rodriguez 4bd43f507c Staging: add otus Atheros wireless network driver
Initial dump of the otus USB wireless network driver.
It builds properly, but a lot of work needs to be done cleaning
it up before it can be merged into the wireless driver tree.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:10 -08:00
Greg Kroah-Hartman e543c24141 Staging: agnx: fix build warnings
Fix some minor build warnins in the agnx driver

Cc: Li YanBo <dreamfly281@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:09 -08:00
Greg Kroah-Hartman aa0d6c34b6 Staging: agnx: fix build errors due to rate control API changes
In commit e6a9854b05, the rate control API
was rewritten, so make the needed changes to the agnx driver so that it
will build and work properly.

Cc: Li YanBo <dreamfly281@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:09 -08:00
Greg Kroah-Hartman 40667f32d1 Staging: agnx: fix build errors due to ssid removal
The wireless core has removed the ssid variables, so also remove
them from the agnx driver so that it builds properly.

Cc: Li YanBo <dreamfly281@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:09 -08:00
Li YanBo 0f22aab897 Staging: add agnx wireless driver
This driver is for the Airgo AGNX00 wireless chip.

From: Li YanBo <dreamfly281@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:09 -08:00
Lior Dotan 470c5736ff Staging: slicoss: use request_firmware
This should make the driver use request_firmware() instead of a static
firmware.
Some obvious things are missing:
1) The unneeded header files are not removed yet. This is to keep the
   patch size small.
2) The .bin files are missing so the driver doesn't have what to load.
3) Testing. None of this was tested. It does compiles OK though :)

Signed-off-by: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:08 -08:00
Lior Dotan 66615321f5 Staging: slicoss: use correct type for memory allcations
Fix sizeof to use the right type

Signed-off-by: Lior Dotan <liodot@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:08 -08:00
Lior Dotan 7c7e18790c Staging: slicoss: use kzalloc
This patch uses kzalloc() where really applicable.

Signed-off-by: Lior Dotan <liodot@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:08 -08:00
Qinghuang Feng 1c80db5c9b Staging: usbip: cleanup kerneldoc
No argument named @regs in stub_complete(), remove it.

Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:08 -08:00
Johann Felix Soden 4eb0068b06 Staging: et131x: remove unused variable in et1310_tx.c
The 'pPacket' variable is assigned, but never used. Remove it.

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:08 -08:00
J.R. Mauro 1352b4b07f Staging: et131x: fix build failure
Fix build failure in et131x driver - missing \ in multiline macro

Signed-off by: J.R. Mauro <jrm8005@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:07 -08:00
Stoyan Gaydarov bb9eacccf6 Staging: et131x: Cleanup et131x_debug.h defines
This patch cleans up the et131x_debug.h defines as well as fix the
checkpatch warnings

Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:07 -08:00
Greg Kroah-Hartman 0484f2082a Staging: go7007: add some more v4l2 ioctls
Now that the v4l2 tree is merged with mainline, enable some of
the compiled out functions.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:07 -08:00
Oliver Neukum 9efb052563 Staging: go7007: small cleanup
small cleanup of go7007:

- prepare for urb->status conversion
- micro optimization
- use kzalloc
- fix free of memory in use in go7007_usb_disconnect

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: Cohen <rcohen@snurgle.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:07 -08:00
Greg Kroah-Hartman 8fca1cb3a4 Staging: go7007: fix minor build warnings
Comment out some functions that we aren't using yet, in anticipation
of using them when the v4l core merges are changed upstream.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:06 -08:00
Harvey Harrison 9febd042da Staging: go7007: annotate code pointers
They are treated as __le16 everywhere, annotate as such.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:06 -08:00
Mauro Carvalho Chehab 65f9f6190b Staging: go7007: Convert driver to use video_ioctl2
go7007: Convert driver to use video_ioctl2

go7007 driver were using the old method of having a big switch for handling
ioctls. Use instead the new video_ioctl2 method.

This patch also adds support for the 2.6.19 new ioctls to enumberate video
formats and intervals.

Still lacking the implementation of compression ioctls needed on go7007.

This patch weren't tested, due to the lack of a hardware with me.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:06 -08:00
Pete Eberlein b11869dbb6 Staging: go7007: add sensoray 2250/2251 support
This is the driver for the Sensoray 2250/2251 USB devices added to
go7007 driver.


Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:06 -08:00
Pete Eberlein d73f822ce7 Staging: go7007: saa7134 updates
- Added documentation including README files from the original go7007
  driver package.
- Added Video4Linux2 MPEG controls.
- Added Video4Linux2 audio ioctls, which pass thru to the i2c driver.
- Improved saa7134 interface, to pass thru controls and video settings.
- Fixed a bug in sony tuner, as reported by Bifferos on the Go7007 wiki.


Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:06 -08:00
J.R. Mauro b2d6a78d9f Staging: echo: Lindent drivers/staging/echo
Lindent drivers/staging/echo

Signed-off by: J.R. Mauro <jrm8005@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:05 -08:00
J.R. Mauro c82895b897 Staging: echo: remove typedefs
Remove typedefs in drivers/staging/echo

Signed-off by: J.R. Mauro <jrm8005@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:05 -08:00
Kay Sievers e913397202 staging: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:05 -08:00
J.R. Mauro 9f37952aa0 Staging: sxg: update README
Update readme in drivers/staging/sxg

Signed-off by: J.R. Mauro <jrm8005@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:05 -08:00
J.R. Mauro 62545d814f Staging: sxg: break the build in a cleaner way when !x86
Remove ugly 'Stop Comilation;' statement in sxghif, replace with an
error macro.

This should never be hit as we are only building for x86 boxes at the
moment.

Signed-off by: J.R. Mauro <jrm8005@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:05 -08:00
J.R. Mauro 73b07065a3 Staging: sxg: remove typedefs
Remove typedefs in the sxg driver

Signed-off by: J.R. Mauro <jrm8005@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:04 -08:00
Vijay Kumar 1b8ee916f5 Staging: poch: Fine grained locking
Lock only the portion of code that does register access.

Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:04 -08:00
Vijay Kumar bf43701250 Staging: poch: Fix user space protocol syncing
Always set the user space offset from kernel space, to indicate group
transmitted/received.

Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:04 -08:00
Vijay Kumar ca219995b2 Staging: poch: Rx control register init
Added Rx control register definition. Flush Rx FIFO on init, and set
continuous DMA mode.

Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:04 -08:00
Vijay Kumar 3ca67c1b94 Staging: poch: Fix build warnings
Removed out printing of DMA address, that causes warnings during
build.

Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:04 -08:00
Vijay Kumar 7dadbbcf7f Staging: poch: minor fixes
Unmap PCI bars on remove().
Validate sysfs values before using them.

Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:03 -08:00
Vijay Kumar ea0a337f34 Staging: poch: Correct pages from bytes.
Accurately calculate the no. of pages from the bytes.

Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:03 -08:00
Vijay Kumar ee49abcf16 Staging: poch: Update TODO list
Update TODO list.

Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:03 -08:00
Vijay Kumar 95ead520a3 Staging: poch: Block size bug fix
Block size is to be expressed in no. of 64 bit transfers. But the code
specifies the block size in bytes. Fix this issue.

Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:03 -08:00
Oliver Neukum 0d1d142433 Staging: at76_usb: cleanup dma on stack issues
- no DMA on stack
- cleanup unclear endianness issue

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:03 -08:00
Greg Kroah-Hartman 6666446290 Staging: at76_usb: fix up all remaining checkpatch.pl warnings
It's now a "clean" driver.

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:02 -08:00
Greg Kroah-Hartman ee254f2958 Staging: at76_usb: remove compiler warnings
3 functions are now not used, remove them.

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:02 -08:00
Greg Kroah-Hartman f7b31e015a Staging: at76_usb: fix build breakage
The previous patch broke the at76_usb driver due to some other
wireless core api changes.  This patch fixes the driver to build
properly again.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:02 -08:00
John W. Linville 02227c2839 Staging: at76_usb: update drivers/staging/at76_usb w/ mac80211 port
This updates drivers/staging/at76_usb to correspond with the latest
version previously available in wireless-testing.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:01 -08:00
Roel Kluin 1f9e9ce1f9 Staging: wlan-ng: skb_p80211_to_ether() - payload_length is unsigned, check before subtraction
payload_length is unsigned, check before subtraction

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
2009-01-06 13:52:01 -08:00
Greg Kroah-Hartman a1da9da991 Staging: wlan-ng: fix compiler warnings
This fixes some compiler warnings in teh wlan-ng driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:01 -08:00
Julia Lawall 9ba8aa7a94 Staging: wlan-ng: p80211wext.c: use ARRAY_SIZE
ARRAY_SIZE is more concise to use when the size of an array is divided by
the size of its type or the size of its first element.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@i@
@@

#include <linux/kernel.h>

@depends on i using "paren.iso"@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(E[...]))
+ ARRAY_SIZE(E)

@depends on i using "paren.iso"@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:01 -08:00
Huang Weiyi d11e5f22ac Staging: wlan-ng: remove unused #include <version.h>
The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/staging/wlan-ng/p80211conv.c
  drivers/staging/wlan-ng/p80211req.c
  drivers/staging/wlan-ng/p80211wext.c
  drivers/staging/wlan-ng/prism2mgmt.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:01 -08:00
Richard Kennedy 33ce0ca6e2 Staging: wlan-ng: p80211conv.c copy code from wlan-ng-devel branch to not drop packets
allow card to correctly receive network packets,
without this change all incoming packets are dropped.
code copied from the latest wlan-ng-devel tree.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:00 -08:00
Richard Kennedy 8636cdedc5 Staging: wlan-ng: hfa384x_usbin_callback: check for hardware removed
hfa384x_usbin_callback: check for hardware removed

copied from latest wlan-ng-devel version

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:00 -08:00
Richard Kennedy 87b3df81fc Staging: wlan-ng: p80211wext don't set default key id twice
p80211wext don't set default key id twice

another change from wlan-ng-devel

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:00 -08:00
Richard Kennedy 46fa61f360 Staging: wlan-ng: p80211wext.c add latest changes & remove extra nulls from wext_handlers
add the latest changes from wlan-ng-devel
remove 2 stray nulls from the wext_handler table introduced
by the tidy up patch.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:00 -08:00
Richard Kennedy 7b7e7e84bd Staging: wlan-ng: hfa384x_usb.c use newest version of 384x_drvr_start
include the needed fixes from Karl Relton
<karllinuxtest.relton@ntlworld.com>

see thread on linux-wlan-devel mailing list
"Possible cause of those pesky hfa384x_usbctlx_complete_sync errors"

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Cc: Karl Relton <karllinuxtest.relton@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:59 -08:00
Richard Kennedy 1d1b69851b Staging: wlan-ng: prism2_usb.c always enable the card in probe_usb
always enable card in probe_usb
& update register_wlandev to match latest wlan-ng-dev tree.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:58 -08:00
Richard Kennedy ee313528d9 Staging: wlan-ng: p80211netdev.c fix netdev alloc to prevent oops on device start
a version of this patch is in the wlan-ng_devel tree

initializes netdev correctly to prevent an oops on device start.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:58 -08:00
Solomon Peachy 56afef56eb Staging: wlan-ng: Purge all MIBs not used internally.
The next step is to bypass the MIB calling mechanism altogether and just
invoke the hardware directly where needed, but at least now the list has
been paired down considerably.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:58 -08:00
Solomon Peachy e02c69b8af Staging: wlan-ng: Consolidate wlan-ng into a single module.
There's no point in having a separate 'p80211' module, as nobody else is
ever going to use it.  Push everyting into a single module, and get rid
of all exports.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:57 -08:00
Solomon Peachy 1e7201836c Staging: wlan-ng: Delete a pile of unused mibs. And fix WEXT SET_TXPOWER.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:57 -08:00
Solomon Peachy cbec30c4c0 Staging: wlan-ng: Delete a large pile of now-unused code.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:57 -08:00
Solomon Peachy aec6a5f034 Staging: wlan-ng: use WIRELESS_EXT, not CONFIG_WIRELESS_EXT
Kconfig doesn't work with variables starting with CONFIG_

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:56 -08:00
Solomon Peachy fc4a76ff19 Staging: wlan-ng: Wireless Extension support is mandatory.
So take away the option to disable it.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:56 -08:00
Solomon Peachy 575a8a5c28 Staging: wlan-ng: Eliminate all backwards-compatible kernel code.
It's not needed at all anymore now that we are in the kernel tree.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:56 -08:00
Solomon Peachy aaad430378 Staging: wlan-ng: Use standard kernel integer (u32/s32/etc) types.
wlan-ng needed to interact with userspace, and support very old kernels,
so it used to define its own types for integers to ensure consistency.

It's all rather irrelevant now.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:56 -08:00
Solomon Peachy 5704976fa9 Staging: wlan-ng: Eliminate usage of procfs.
These files are not needed to work properly, and don't belong in procfs

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:55 -08:00
Solomon Peachy ff1ae8f3c1 Staging: wlan-ng: Eliminate local 'version.h'
The kernel provides us with the proper version of this file.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:55 -08:00
Solomon Peachy 905862c9f9 Staging: wlan-ng: Eliminate one more rx mtu test.
It also isn't needed.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:55 -08:00
Solomon Peachy 9d86349e9c Staging: wlan-ng: Get rid of the MTU tests in the rx conversion path.
They are not needed.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:55 -08:00
Solomon Peachy 5db8dcc98b Staging: wlan-ng: Remove AP-only code from MLME functions.
It is not needed in this driver.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:54 -08:00
Solomon Peachy f980c178ea Staging: wlan-ng: Eliminate a boatload of tertiaryAP-only code.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:54 -08:00
Solomon Peachy 8a1396ef7e Staging: wlan-ng: Eliminate all backwards-compatibility for <2.6.13 kernels.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:54 -08:00
Solomon Peachy 68a193e4bb Staging: wlan-ng: Eliminate more <2.6 kernel support.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:54 -08:00
Solomon Peachy 187a769636 Staging: wlan-ng: Make wlan-ng use WEXT mode by default.
As this is the kernel default mode.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:53 -08:00
Solomon Peachy dff1dc8caa Staging: wlan-ng: Delete PCI/PLX/PCMCIA-specific code.
Also delete a large pile of code that existed to support <2.6 kernels.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:53 -08:00
Solomon Peachy fe5755f61a Staging: wlan-ng: Update Help text to mention prism3 devices.
The driver also supports prism3 devices

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:53 -08:00
Solomon Peachy c9b01df34b Staging: wlan-ng: Remove PCI/PLX/PCMCIA files.
This portion of the driver is not needed at all, so remove it.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:53 -08:00
Greg Kroah-Hartman f02466fc19 Staging: w35und: fix config build warnings
the wireless config function has changed with commit
e8975581f6 so fix up the wbusb driver to
work properly with that change.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:52 -08:00
Pavel Machek 310d465d83 Staging: w35und: fix Kconfig
4KSTACK dependency was needed when driver carried its own softmac
layer. That layer is gone, and functions have reasonably small stack
footprint -> dependency can be removed.

Add better description of hardware this driver is targetted at (now
with fixed whitespace)

Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:52 -08:00
Pekka Enberg a3f245a2df Staging: w35und: remove rxisr.c as dead code
The vRxTimerStart() function is never called nor does the timer do anything
useful so remove the code.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:52 -08:00
Pekka Enberg 82321c2b56 Staging: w35und: remove dead code from wbhal.c
Remove tons of unused code from wbhal.c.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:51 -08:00
Pekka Enberg 5c58093e63 Staging: w35und: make functions local to wb35tx.c static
While there are no functional changes, the diff is quite large because we need
to shuffle code around to avoid forward declarations.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:51 -08:00
Pekka Enberg c139a814ab Staging: w35und: make functions local to wb35rx.c static
While there are no functional changes, the diff is quite large because we need
to shuffle code around to avoid forward declarations.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:51 -08:00
Pekka Enberg a22517fec0 Staging: w35und: remove dead code from mto.c
Remove lots of code that's never used.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:51 -08:00
Pekka Enberg 7cd5613fdf Staging: w35und: make functions local to mlmetxrx.c static
Convert functions that don't have external references to static and remove the
ones that are not used at all.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:51 -08:00
Pekka Enberg 6261ab3a63 Staging: w35und: make functions local to mds.c static
The functions have no external references so make them static after shuffling
the code around a bit to avoid forward declarations.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2009-01-06 13:51:51 -08:00
Pekka Enberg 54369cc69c Staging: w35und: remove ->shutdown from struct wbsoft_priv
It's not actually used for anything, so remove it.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:50 -08:00
Pekka Enberg 72e202d00e Staging: w35und: remove ->skb_array from struct wbsoft_priv
It's not actually used for anything, so remove it.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:50 -08:00
Pekka Enberg 3cae503bf6 Staging: w35und: move packet_came() to wb35rx.c
The function no longer has dependencies to wbusb.c so we can move it to
wb35rx.c and make it static now.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:50 -08:00
Pekka Enberg c930e0c008 Staging: w35und: move global wbsoft_enabled to struct wbsoft_priv
This is a preparational step for moving packet_came() to wb35rx.c().

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:50 -08:00
Pekka Enberg 82f8c2cd46 Staging: w35und: remove unused ->ShutDowned member from struct LOCAL_PARA
It's not actually read by anyone so we might as well remove it.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:50 -08:00
Pekka Enberg 912b209f50 Staging: w35und: clean up wblinux.c a bit
This patch removes wrapper functions from wblinux.c and moves the hardware init
and halt functions to wbusb.c which has the only callers of them.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:49 -08:00
Pekka Enberg 7b9a79bf48 Staging: w35und: inline DRIVER_AUTHOR and DRIVER_DESC macros
They're used in one place so we can inline them.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:49 -08:00
Pekka Enberg 7fff1316b9 Staging: w35und: remove global struct ieee80211_hw
Remove the my_dev global variable from wbusb.c by passing a pointer to struct
ieee80211_hw around so that packet_came() gets it.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:49 -08:00
Pekka Enberg 1e8a2b6033 Staging: w35und: merge struct wb35_adapter to struct wbsoft_priv
This patch merges struct wb35_adapter to struct wbsoft_priv. Now we can finally
start passing a pointer to struct ieee80211_hw around where necessary.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:49 -08:00
Pekka Enberg ac418b8faa Staging: w35und: clean up adapter.h a bit
This patch cleans up adapter.h a bit in preparation for merging struct
wb35_adapter to struct wbsoft_priv.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:48 -08:00
Pekka Enberg 42c84bb460 Staging: w35und: remove ->adapter from struct _HW_DATA_T
Eventually we want to pass a pointer to struct ieee80211_hw around in the
driver, so remove the bidirectional link between struct wb35_adapter and struct
_HW_DATA_T to simplify the code.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:48 -08:00
Pekka Enberg cc18071068 Staging: w35und: move struct wbsoft_priv to core.h and use it
This patch removes my_adapter global variable from wbusb.c by adding a
->adapter member to struct wbsoft_priv.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:48 -08:00
Pekka Enberg 9ce922fde7 Staging: w35und: move source files to one directory
As we're trying to get rid of the "compatability layer" in the driver, move
everything under one directory. Keeping some of the files under
drivers/staging/winbond/linux is a major pain in the ass whenever you're
cleaning up the driver.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:47 -08:00
Pekka Enberg 8421513d9a Staging: w35und: remove some dead code
This patch removes the WBLinux_ReceivePacket(), WBLINUX_GetNextPacket(),
WBLINUX_GetNextPacketCompleted, and sme_get_rssi() functions, which execute
BUG() unconditionally, and related dead code.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:47 -08:00
Pekka Enberg 80aba53616 Staging: w35und: #include cleanup
This patch moves #includes from sysdef.h and common.h to the files which
actually need them. This makes the dependencies less complex and allows us to
move code around much easily.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2009-01-06 13:51:47 -08:00
Pekka Enberg 8971280fb2 Staging: w35und: remove unused link status code
The WBLINUX_ConnectStatus() and related code is not used anywhere so remove
them from the driver.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:46 -08:00
Pekka Enberg 350e858868 Staging: w35und: remove unused macros from common.h
The macros are not used anywhere so remove them from driver code.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:46 -08:00
Pekka Enberg 4460a0b4d5 Staging: w35und: remove abs() and BIT() macros
We can use the kernel built-in abs() and BIT() macros the just fine.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:46 -08:00
Pekka Enberg fc68c7efea Staging: w35und: remove memcpy/memcmp wrappers
The OS_MEMORY_CLEAR macro is not used so remove it. Also convert the one
call-site that uses OS_MEMORY_COMPARE to use memcmp() directly and remove the
wrapper macro.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:45 -08:00
Pekka Enberg 44e8541c5e Staging: w35und: remove atomic op wrappers
Use the kernel provided atomic op functions and remove the OS_ATOMIC and
related wrapper macros.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:45 -08:00
Pekka Enberg deee7c8164 Staging: w35und: remove timer wrappers
This patch removes the OS_TIMER and related wrappers from driver code. The
patch also changes the code to use msecs_to_jiffies() for setting up
timer->expires.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:45 -08:00
Pekka Enberg a36e0894bf Staging: w35und: move supported band initialization out of wb35_probe()
This patch moves the static struct ieee80211_supported_band initialization out
of w35_probe() because it's really global read-only configuration data.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:45 -08:00
Pekka Enberg 16d3659fcd Staging: w35und: plug memory leak in wbsoft_tx()
There's no reason to duplicate the skb in wbsoft_tx() and leak GFP_ATOMIC
memory as the contents are copied to ->TxBuffer in MdxTx() anyway before
MLMESendFrame() returns.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:44 -08:00
Pekka Enberg 3c01ec0d82 Staging: w35und: remove macro magic from MLME_GetNextPacket()
This removes the macro magic from MLME_GetNextPacket() to de-obfuscate the
code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:44 -08:00
Pekka Enberg 4af12e55a5 Staging: w35und: usb_put_dev() is missing from wb35_disconnect()
The wb35_probe() function does usb_get_dev() so add a missing usb_put_dev() to
the wb35_disconnect() function. Also fix error handling paths in wb35_probe()
to call usb_put_dev() as well.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:44 -08:00
Pekka Enberg c8b2b70b43 Staging: w35und: OS_MEMORY_ALLOC wrapper removal
This patch removes the rather scary OS_MEMORY_ALLOC macro.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:44 -08:00
Pekka Enberg 279b6ccc00 Staging: w35und: remove true/false boolean macros
Use the kernel built-in true and false boolean values instead of duplicating
them in the driver code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:43 -08:00
Pekka Enberg 9ce9ed5d8d w35und: remove dead code from wbusb_f.h
Remove dead code from wbusb_f.h and move the WbWLanInitialize() definition to
wblinux_f.h where it arguably belongs to. As the wbusb_f.h is now empty, we can
remove it completely.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:43 -08:00
Greg Kroah-Hartman f3d201886d Staging: w35und: remove usb_alloc_urb wrapper function
No need for a simple wrapper here.


Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:42 -08:00
Greg Kroah-Hartman 7c12604380 Staging: w35und: remove usb_submit_urb wrapper function
No need for a simple wrapper here.

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:42 -08:00
Pekka Enberg 1523ddc482 Staging: w35und: wb35_probe() cleanup
Fix error handling in wb35_probe() function and clean it up a bit.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:41 -08:00
Pekka Enberg 581f67cf3c Staging: w35und: merge wblinux struct to adapter
Zaps another compatability layer from the driver code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:41 -08:00
Pekka Enberg 88ebc4b950 Staging: w35und: padapter struct typedef removal
Remove the PADAPTER typedef and its strange variants. Also fix up variable
names that use the type while we're at it.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:41 -08:00
Pekka Enberg 65144de798 Staging: w35und: wb35reg struct typedef removal
This patch removes the WB35REG struct typedefs and fixes up variable names that
use the type.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:41 -08:00
Pekka Enberg f37435ce86 Staging: w35und: reg queue struct typedef removal
This patch removes the struct typedefs for reg queues.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:40 -08:00
Pekka Enberg a55a89b175 Staging: w35und: purb typedef removal
This patch removes the struct urb pointer typedef from the driver code and
fixes up variable names that use the typedef while we're at it.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:40 -08:00
Pekka Enberg 3e855b2a08 Staging: w35und: remove the no-op pa_stall_execution macro
The pa_stall_execution() macro doesn't do anything so remove it from driver
code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:40 -08:00
Pekka Enberg 34222e0a7b Staging: w35und: use msleep() and udelay()
This patch removes the OS_SLEEP() wrapper and changes the call-sites to use
msleep() and udelay() where appropriate.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:39 -08:00
Pekka Enberg 4fc838fe40 Staging: w35und: remove unused wb35_open() and wb35_close() functions
The functions are not used anywhere so remove them.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:39 -08:00
Pekka Enberg 302bae8548 Staging: w35und: make wb35_probe() and wb35_disconnect() funtions static
The wb35_probe() and wb35_disconnect() functions are only used in wbusb.c so
make them static and remove them from a header file.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:39 -08:00
Harvey Harrison a337957247 staging: correct dubious use of !x & y
Noticed by sparse:
drivers/staging/me4000/me4000.c:1213:43: warning: dubious: !x & y
drivers/staging/wlan-ng/p80211wext.c:1583:21: warning: dubious: !x & y

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:38 -08:00
Greg Kroah-Hartman 60572c0d8b Staging: go7007: fixes due v4l2_file_operations api change
v4l2_file_operations was introduced, so use it to fix up
the build errors in the go7007 driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:38 -08:00
Greg Kroah-Hartman 4f7ddec223 Staging: go7007: fixes due to video_usercopy api change
video_usercopy() just changed its arguments, so fix up the go7007 driver
to properly build.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:37 -08:00
Hans J. Koch e70c412ee4 UIO: Pass information about ioports to userspace (V2)
Devices sometimes have memory where all or parts of it can not be mapped to
userspace. But it might still be possible to access this memory from
userspace by other means. An example are PCI cards that advertise not only
mappable memory but also ioport ranges. On x86 architectures, these can be
accessed with ioperm, iopl, inb, outb, and friends. Mike Frysinger (CCed)
reported a similar problem on Blackfin arch where it doesn't seem to be easy
to mmap non-cached memory but it can still be accessed from userspace.

This patch allows kernel drivers to pass information about such ports to
userspace. Similar to the existing mem[] array, it adds a port[] array to
struct uio_info. Each port range is described by start, size, and porttype.

If a driver fills in at least one such port range, the UIO core will simply
pass this information to userspace by creating a new directory "portio"
underneath /sys/class/uio/uioN/. Similar to the "mem" directory, it will
contain a subdirectory (portX) for each port range given.

Note that UIO simply passes this information to userspace, it performs no
action whatsoever with this data. It's userspace's responsibility to obtain
access to these ports and to solve arch dependent issues. The "porttype"
attribute tells userspace what kind of port it is dealing with.

This mechanism could also be used to give userspace information about GPIOs
related to a device. You frequently find such hardware in embedded devices,
so I added a UIO_PORT_GPIO definition. I'm not really sure if this is a good
idea since there are other solutions to this problem, but it won't hurt much
anyway.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:44 -08:00
Mike Frysinger e543ae8966 UIO: uio_pdrv_genirq: allow custom irq_flags
I can't think of a reason why the driver prevents people from setting any
custom bits in their platform device, but I can think of some reasons for
allowing custom flags.  Like setting the IRQF_TRIGGER_... bits.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:43 -08:00
Arjan van de Ven 7898aa5c39 UIO: use pci_ioremap_bar() in drivers/uio
Use the newly introduced pci_ioremap_bar() function in drivers/uio.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:43 -08:00
Kay Sievers b9d5fc41dc libata: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:43 -08:00
Kay Sievers 6ff4dd36d6 dmi: struct device - replace bus_id with dev_name(), dev_set_name()
CC: Lennart Poettering <mzxreary@0pointer.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:42 -08:00
Kay Sievers c682b17060 gadget: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:42 -08:00
Kay Sievers 14ab309d33 gpio: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:42 -08:00
Kay Sievers 8f4bbd9f59 gpu: struct device - replace bus_id with dev_name(), dev_set_name()
CC: Dave Airlie <airlied@redhat.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:41 -08:00
Kay Sievers 739cf3a269 hwmon: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:41 -08:00
Kay Sievers cd3ed6b4dd i2o: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:40 -08:00
Kay Sievers 24f81a7047 i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name()
CC: Andy Henroid <andrew.d.henroid@intel.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:39 -08:00
Kay Sievers d927e38c6c infiniband: struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:39 -08:00
Kay Sievers 0162f3822c ISDN: struct device - replace bus_id with dev_name(), dev_set_name()
CC: Karsten Keil <kkeil@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:39 -08:00
Kay Sievers 1d7e6cca1d macintosh: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:39 -08:00
Kay Sievers 0252c3b4f0 memstick: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:38 -08:00
Kay Sievers 475b44c199 mtd: struct device - replace bus_id with dev_name(), dev_set_name()
CC: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:38 -08:00
Kay Sievers 24d254759d mwave: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:38 -08:00
Kay Sievers c85e37c51e pnp: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:38 -08:00
Kay Sievers ba88b0029f power-supply: struct device - replace bus_id with dev_name(), dev_set_name()
CC: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:38 -08:00
Kay Sievers 4bfe090b0a serial: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:37 -08:00
Kay Sievers bb0dc43eee SGI: struct device - replace bus_id with dev_name(), dev_set_name()
CC: Jack Steiner <steiner@sgi.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:37 -08:00
Kay Sievers 35f74fcab1 spi: struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:37 -08:00
Kay Sievers 354655ea97 thermal: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:37 -08:00
Kay Sievers 0bad16aa08 tifm: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:35 -08:00
Kay Sievers 64dba9a9a3 video: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:35 -08:00
Kay Sievers 40f91de6a1 w1: struct device - replace bus_id with dev_name(), dev_set_name()
CC: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:34 -08:00
Kay Sievers 2a678cc539 xen: struct device - replace bus_id with dev_name(), dev_set_name()
CC: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:34 -08:00
Mark McLoughlin 035da16fb5 s390: remove s390_root_dev_*()
Replace s390_root_dev_register() with root_device_register() etc.

[Includes fix from Cornelia Huck]

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:34 -08:00
Mark McLoughlin ff8561c4ad lguest: do not statically allocate root device
We shouldn't be statically allocating the root device object,
so dynamically allocate it using root_device_register()
instead.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:34 -08:00
Mark McLoughlin 63d1255670 virtio: do not statically allocate root device
We shouldn't be statically allocating the root device object,
so dynamically allocate it using root_device_register()
instead.

Also avoids this warning from 'rmmod virtio_pci':

  Device 'virtio-pci' does not have a release() function, it is broken and must be fixed

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:34 -08:00
Mark McLoughlin 0aa0dc41bf driver core: add root_device_register()
Add support for allocating root device objects which group
device objects under /sys/devices directories.

Also add a sysfs 'module' symlink which points to the owner
of the root device object. This symlink will be used in virtio
to allow userspace to determine which virtio bus implementation
a given device is associated with.

[Includes suggestions from Cornelia Huck]

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:33 -08:00
Ming Lei 7232800ba8 driver core:fix duplicate removing driver link in __device_release_driver
In __device_release_driver(),driver_sysfs_remove() has removed the
driver link under device dir in sysfs, but sysfs_remove_link() is
called again to do such thing. Remove the duplicate call to
sys_remove_link().

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:33 -08:00
Alan Stern ec0676ee28 Driver core: move the bus notifier call points
This patch (as1184) changes the location of the notifications in
device_add() and device_del().  Now the BUS_NOTIFY_ADD_DEVICE message
is sent after dpm_sysfs_add(), which is necessary for clients that
want to add attributes to the power/ subdirectory.  The
BUS_NOTIFY_DEL_DEVICE message is correspondingly moved before
dpm_sysfs_remove().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:33 -08:00
Greg Kroah-Hartman b9daa99ee5 driver core: move knode_bus into private structure
Nothing outside of the driver core should ever touch knode_bus, so
move it out of the public eye.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:33 -08:00
Greg Kroah-Hartman 93e746db18 driver core: move knode_driver into private structure
Nothing outside of the driver core should ever touch knode_driver, so
move it out of the public eye.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:32 -08:00
Greg Kroah-Hartman 11c3b5c3e0 driver core: move klist_children into private structure
Nothing outside of the driver core should ever touch klist_children, or
knode_parent, so move them out of the public eye.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:32 -08:00
Greg Kroah-Hartman 2831fe6f9c driver core: create a private portion of struct device
This is to be used to move things out of struct device that no code
outside of the driver core should ever touch.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:32 -08:00
Rafael J. Wysocki 355a72d75b PCI: Rework default handling of suspend and resume
Rework the handling of suspend and resume of PCI devices which have
no drivers or the drivers of which do not provide any suspend-resume
callbacks in such a way that their standard PCI configuration
registers will be saved and restored with interrupts disabled.  This
should prevent such devices, including PCI bridges, from being
resumed too late to be able to function correctly during the resume
of the other PCI devices that may depend on them.

Also, to remove one possible source of future confusion, drop the
default handling of suspend and resume for PCI devices with drivers
providing the 'pm' object introduced by the new suspend-resume
framework (there are no such PCI drivers at the moment).

This patch addresses the regression from 2.6.26 tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12121 .

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:32 -08:00
Kay Sievers 1e0b2cf933 driver core: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:31 -08:00
Rafael J. Wysocki adf094931f PM: Simplify the new suspend/hibernation framework for devices
PM: Simplify the new suspend/hibernation framework for devices

Following the discussion at the Kernel Summit, simplify the new
device PM framework by merging 'struct pm_ops' and
'struct pm_ext_ops' and removing pointers to 'struct pm_ext_ops'
from 'struct platform_driver' and 'struct pci_driver'.

After this change, the suspend/hibernation callbacks will only
reside in 'struct device_driver' as well as at the bus type/
device class/device type level.  Accordingly, PCI and platform
device drivers are now expected to put their suspend/hibernation
callbacks into the 'struct device_driver' embedded in
'struct pci_driver' or 'struct platform_driver', respectively.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:29 -08:00
Sergei Shtylyov c2ce5ca047 scc_pata: make use of scc_dma_sff_read_status()
Make consistent use of scc_dma_sff_read_status() throughout the driver.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06 17:21:02 +01:00
Sergei Shtylyov 05789634ef ide-dma-sff: factor out ide_dma_sff_write_status()
Factor out ide_dma_sff_write_status(), symmetric to ide_dma_sff_read_status().

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06 17:21:02 +01:00
Sergei Shtylyov 592b531521 ide: move read_sff_dma_status() method to 'struct ide_dma_ops'
Move apparently misplaced read_sff_dma_status() method from 'struct ide_tp_ops'
to 'struct ide_dma_ops', renaming it to dma_sff_read_status() and making only
required for SFF-8038i compatible IDE controller drivers (greatly cutting down
the number of initializers) as its only user (outside ide-dma-sff.c and such
drivers) appears to be ide_pci_check_simplex() which is only called for such
controllers...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06 17:21:02 +01:00
Sergei Shtylyov 3f023b0138 ide: don't set hwif->dma_ops in init_dma() method
Replace setting of 'hwif->dma_ops' in the 'alim15x3' and 'palm_bk3710' drivers'
init_dma() methods with initializing the corresponding member of their 'struct
ide_port_info' instances and remove such setting from the 'hpt366' driver that
just doesn't use 'sff_dma_ops'. Along with some code save, this prepares us for
the next patch...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06 17:21:01 +01:00
Shane McDonald 391ad1908a Resurrect IT8172 IDE controller driver
Support for the IT8172 IDE controller was removed from the kernel
sometime after 2.6.18.  Support for the only boards that used the IT8172
was removed from the kernel after 2.6.18, as they had never compiled
since 2.6.0.  However, there are a couple of platforms that use this
chip: the PMC-Sierra Xiao Hu thin-client computer, which is no longer
in production, and the Linksys NSS4000 Network Attached Storage box,
which is based on the Xiao Hu board.  I am attempting to add support
for the Xiao Hu to the kernel, and this IT8172 IDE controller is the
first bit of code in this effort.

This patch resurrects the IT8172 IDE controller code.  I began with
the 2.6.18 version of the it8172.c file, and have moved it forward so
that it works with the latest version of the kernel.  I have run this
driver on a PMC-Sierra Xiao Hu board with the 2.6.28 kernel, and
I have had no problems with it in my configuration.  The attached patch
applies cleanly against 2.6.28.

Signed-off-by: Shane McDonald <mcdonald.shane@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: alan@lxorguk.ukuu.org.uk
[bart: s/HWIF(drive)/drive->hwif/]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06 17:21:01 +01:00
Bartlomiej Zolnierkiewicz 7ee98034d6 piix: sync ich_laptop[] with ata_piix.c
Allows UDMA > 33 on ACER TM290 and ACER Aspire 1694WLMi.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06 17:21:01 +01:00
Bartlomiej Zolnierkiewicz e630fcbe93 ide: fix ide_port_scan() to do ACPI setup after initializing request queues
This makes ide_port_scan()'s behavior match ide_host_register()'s
one and fixes OOPS in elv_may_queue() during port re-scan.

Reported-and-tested-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06 17:21:00 +01:00