summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* kref: fix up the kfree build problemsGreg Kroah-Hartman2011-12-141-5/+10
| | | | | | | | | | | | | | | | | | | | | | | It turns out that some memory allocators use kobjects, which use krefs, and kref.h was wanting to figure out the address of kfree(), which ended up in a loop. kfree was only being needed for a warning to tell the caller that they were doing something stupid. Now we just move that warning into the comments for the functions, which results in a bit more fun as everyone enjoys digging for people to mock at times of boredom. So, remove the dependancy of slab.h on kref.h, and fix up the other include file as well (we really only need bug.h and atomic.h, not types.h). Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kref: Remove the memory barriersPeter Zijlstra2011-12-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1b0b3b9980e ("kref: fix CPU ordering with respect to krefs") wrongly adds memory barriers to kref. It states: some atomic operations are only atomic, not ordered. Thus a CPU is allowed to reorder memory references to an object to before the reference is obtained. This fixes it. While true, it fails to show why this is a problem. I say it is not a problem because if there is a race with kref_put() such that we could end up referencing a free'd object without this memory barrier, we would still have that race with the memory barrier. The kref_put() in question could complete (and free the object) before the atomic_inc() and we'd still be up shit creek. The kref_init() case is even worse, if your object is published at this time you're so wrong the memory barrier won't make a difference what so ever. If its not published, the act of publishing should include the needed barriers/locks to make sure all writes prior to the act of publishing are complete such that others will only observe a complete object. Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Oliver Neukum <oneukum@suse.de> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kref: Implement kref_put in terms of kref_subPeter Zijlstra2011-12-131-18/+10
| | | | | | | | | | Less lines of code is better. Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kref: Inline all functionsPeter Zijlstra2011-12-133-103/+76
| | | | | | | | | | | These are tiny functions, there's no point in having them out-of-line. Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-8eccvi2ur2fzgi00xdjlbf5z@git.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Drivers: hv: Get rid of an unnecessary check in hv.cK. Y. Srinivasan2011-12-121-5/+0
| | | | | | | | | In preparation for eventually supporting kexec in Linux VMs on Hyper-V, get rid of an unnecessary check in hv_init(). Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Drivers: hv: Make the vmbus driver unloadableK. Y. Srinivasan2011-12-124-0/+26
| | | | | | | | | It turns out that the vmbus driver can be made unloadable. Make it unloadable. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Drivers: hv: Fix a memory leakK. Y. Srinivasan2011-12-121-0/+1
| | | | | | | | | There was a memory leak in a failure path in vmbus_process_offer(). Fix it. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Documentation: Update stable addressJoe Perches2011-12-122-6/+6
| | | | | | | | | | | The Japanese/Korean/Chinese versions still need updating. Also, the stable kernel 2.6.x.y descriptions are out of date and should be updated as well. Signed-off-by: Joe Perches <joe@perches.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* MAINTAINERS: stable: Update addressJoe Perches2011-12-121-1/+1
| | | | | | | | The old address hasn't worked since the great intrusion of August 2011. Signed-off-by: Joe Perches <joe@perches.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* w1: add fast search for single slave busEvgeniy Polyakov2011-12-091-0/+10
| | | | | | | | | | | | This enables a much more efficient way of device searching. It uses the 1-wire read-rom operation which allows the direct reading of the slave address. BUT this works only with exactly one slave on the bus. Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> index c374978..9761950 100644 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver-core: skip uevent generation when nobody is listeningKay Sievers2011-12-091-0/+3
| | | | | | | | | Most network namespaces unlikely have listeners to uevents, and should benefit from skipping all the string copies. Cc: Eric Biederman <ebiederm@xmission.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivers: hv: Don't OOPS when you cannot init vmbusK. Y. Srinivasan2011-12-091-0/+16
| | | | | | | | | | | | The hv vmbus driver was causing an OOPS since it was trying to register drivers on top of the bus even if initialization of the bus has failed for some reason (such as the odd chance someone would run a hv enabled kernel in a non-hv environment). Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* firmware: google: fix gsmi.c build warningMaxin B. John2011-12-091-1/+2
| | | | | | | | | | | | | Use min_t() macro instead of min() to fix a build warning: CC drivers/firmware/google/gsmi.o drivers/firmware/google/gsmi.c: In function ‘gsmi_get_variable’: drivers/firmware/google/gsmi.c:348: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Maxin B. John <maxin.john@gmail.com> Acked-By: Mike Waychison <mikew@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivers_base: make argument to platform_device_register_full constUwe Kleine-König2011-12-092-2/+2
| | | | | | | | platform_device_register_full doesn't modify *pdevinfo so it can be marked as const without further adaptions. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* uio: convert drivers/uio/* to use module_platform_driver()Axel Lin2011-11-263-36/+3
| | | | | | | | | | | | | This patch converts the drivers in drivers/uio/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Cc: Magnus Damm <damm@igel.co.jp> Cc: Amit Chatterjee <amit.chatterjee@ti.com> Cc: Pratheesh Gangadhar <pratheesh@ti.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* topology: Provide CPU topology in sysfs in !SMP configurationsBen Hutchings2011-11-261-2/+2
| | | | | | | | | | | We should provide topology information to userland even if it's not very interesting. The current code appears to work properly for !SMP (tested on i386). Reference: http://bugs.debian.org/649216 Reported-by: Marcus Osdoba <marcus.osdoba@googlemail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* debugfs: remove unneeded cast in debugfs_print_regs32()Dan Carpenter2011-11-261-1/+1
| | | | | | | | | | | | | | The cast here causes a Sparse warning: fs/debugfs/file.c:561:42: warning: cast removes address space of expression fs/debugfs/file.c:561:42: warning: incorrect type in argument 1 (different address spaces) fs/debugfs/file.c:561:42: expected void const volatile [noderef] <asn:2>*addr fs/debugfs/file.c:561:42: got void *<noident> It's redundant to cast it to a (void *) anyway when it is already a (void __iomem *). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* hv: Add Kconfig menu entryBart Van Assche2011-11-261-1/+3
| | | | | | | | | | | | Most of the drivers/*/Kconfig files define a menu entry. Define a menu item for hv too such that it becomes uniform with e.g. virtio for at least "make xconfig" and "make menuconfig" users. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: James Bottomley <JBottomley@Parallels.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: hv: vmbus: Support building the vmbus driver as part of the kernelK. Y. Srinivasan2011-11-261-1/+1
| | | | | | | | | | | Modify the way we initialize the vmbus driver so that all the hyper-v drivers can be linked with the kernel and still ensure that the vmbus driver is fully initialized before the drivers that depend upon the vmbus driver attempt to initialize. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* hv: Move Kconfig menu entryBart Van Assche2011-11-261-2/+2
| | | | | | | | | | | | | Move the "Device Drivers/Microsoft Hyper-V guest support" menu entry up such that it appears immediately below virtio (KVM and lguest guest driver support) instead of after a hypervisor driver menu entry. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: James Bottomley <JBottomley@Parallels.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* debugfs: bugfix: include <linux/io.h> in file.cAlessandro Rubini2011-11-221-0/+1
| | | | | | | | | The regs32 machinery uses readl. I forgot the mandatory include and the code was not compiling on all archs. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: fix a warningAlessandro Rubini2011-11-181-1/+0
| | | | | | | The previous patch left an unused variable, I apologize. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* debugfs: print_regs32: make regs array a const pointerAlessandro Rubini2011-11-182-2/+2
| | | | | Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: use debugfs_print_regs32()Alessandro Rubini2011-11-181-12/+3
| | | | | | | | | | This a use example of the regs32 utilities in debugfs, although this fuse use ":" as separator between name and value, and debugs uses "=" (as it looked to me a more common practice). Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* debugfs: add tools to printk 32-bit registersAlessandro Rubini2011-11-183-1/+147
| | | | | | | | | | | | | Some debugfs file I deal with are mostly blocks of registers, i.e. lines of the form "<name> = 0x<value>". Some files are only registers, some include registers blocks among other material. This patch introduces data structures and functions to deal with both cases. I expect more users of this over time. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert some miscellanies drivers to use module_usb_driver()Greg Kroah-Hartman2011-11-1812-216/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the remaining USB drivers in the kernel to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Till Harbaum <till@harbaum.org> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: Chris Ball <cjb@laptop.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Evgeniy Polyakov <zbr@ioremap.net> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Cc: Jamie Iles <jamie@jamieiles.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert sound/* to use module_usb_driver()Greg Kroah-Hartman2011-11-185-63/+6
| | | | | | | | | | | | | | | | | | This converts the drivers in sound/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Daniel Mack <zonque@gmail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Torsten Schenk <torsten.schenk@zoho.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Karsten Wiese <fzu@wemgehoertderstaat.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert drivers/hid/* to use module_usb_driver()Greg Kroah-Hartman2011-11-182-32/+2
| | | | | | | | | | | | This converts the drivers in drivers/hid/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert drivers/input/* to use module_usb_driver()Greg Kroah-Hartman2011-11-1814-227/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | This converts the drivers in drivers/input/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Henk Vergonet <Henk.Vergonet@gmail.com> Cc: Alessandro Rubini <rubini@ipvvis.unipv.it> Cc: Henrik Rydberg <rydberg@euromail.se> Cc: "Magnus Hörlin" <magnus@alefors.se> Cc: Chris Moeller <kode54@gmail.c> Cc: Christoph Fritz <chf.fritz@googlemail.com> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Edwin van Vliet <edwin@cheatah.nl> Cc: Ping Cheng <pingc@wacom.com> Cc: Eduard Hasenleithner <eduard@hasenleithner.at> Cc: Alexander Strakh <strakh@ispras.ru> Cc: Glenn Sommer <gsommer@datanordisk.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert drivers/bluetooth/* to use module_usb_driver()Greg Kroah-Hartman2011-11-185-81/+5
| | | | | | | | | | | | | This converts the drivers in drivers/bluetooth/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Marcel Holtmann <marcel@holtmann.org> Cc: "Gustavo F. Padovan" <padovan@profusion.mobi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert drivers/media/* to use module_usb_driver()Greg Kroah-Hartman2011-11-1897-1635/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the drivers in drivers/media/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Luca Risolia <luca.risolia@studio.unibo.it> Cc: Jean-Francois Moine <moinejf@free.fr> Cc: Frank Zago <frank@zago.net> Cc: Olivier Lorin <o.lorin@laposte.net> Cc: Erik Andren <erik.andren@gmail.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Brian Johnson <brijohn@gmail.com> Cc: Leandro Costantino <lcostantino@gmail.com> Cc: Antoine Jacquet <royale@zerezo.com> Cc: Jarod Wilson <jarod@redhat.com> Cc: Florian Mickler <florian@mickler.org> Cc: Antti Palosaari <crope@iki.fi> Cc: Michael Krufky <mkrufky@kernellabs.com> Cc: "David Härdeman" <david@hardeman.nu> Cc: Florent Audebert <florent.audebert@anevia.com> Cc: Sam Doshi <sam@metal-fish.co.uk> Cc: Manu Abraham <manu@linuxtv.org> Cc: Olivier Grenie <olivier.grenie@dibcom.fr> Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr> Cc: "Igor M. Liplianin" <liplianin@me.by> Cc: Derek Kelly <user.vdr@gmail.com> Cc: Malcolm Priestley <tvboxspy@gmail.com> Cc: Steven Toth <stoth@kernellabs.com> Cc: "André Weidemann" <Andre.Weidemann@web.de> Cc: Martin Wilks <m.wilks@technisat.com> Cc: Tejun Heo <tj@kernel.org> Cc: Jose Alberto Reguero <jareguero@telefonica.net> Cc: David Henningsson <david.henningsson@canonical.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Joe Perches <joe@perches.com> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: Alexey Khoroshilov <khoroshilov@ispras.ru> Cc: Anssi Hannula <anssi.hannula@iki.fi> Cc: Rafi Rubin <rafi@seas.upenn.edu> Cc: Dan Carpenter <error27@gmail.com> Cc: Paul Bender <pebender@gmail.com> Cc: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: "Márcio A Alves" <froooozen@gmail.com> Cc: Julia Lawall <julia@diku.dk> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Chris Rankin <rankincj@yahoo.com> Cc: Lee Jones <lee.jones@canonical.com> Cc: Andy Walls <awalls@md.metrocast.net> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Dean Anderson <linux-dev@sensoray.com> Cc: Pete Eberlein <pete@sensoray.com> Cc: Arvydas Sidorenko <asido4@gmail.com> Cc: Andrea Anacleto <andreaanacleto@libero.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert drivers/net/* to use module_usb_driver()Greg Kroah-Hartman2011-11-1844-668/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the drivers in drivers/net/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Samuel Ortiz <samuel@sortiz.org> Cc: Oliver Neukum <oliver@neukum.name> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Petko Manolov <petkan@users.sourceforge.net> Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Dan Williams <dcbw@redhat.com> Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Cc: Herton Ronaldo Krzesinski <herton@canonical.com> Cc: Hin-Tak Leung <htl10@users.sourceforge.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: "David S. Miller" <davem@davemloft.net> Cc: Roel Kluin <roel.kluin@gmail.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Jiri Pirko <jpirko@redhat.com> Cc: Pavel Roskin <proski@gnu.org> Cc: Yoann DI-RUZZA <y.diruzza@lim.eu> Cc: George <george0505@realtek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert drivers/staging/* to use module_usb_driver()Greg Kroah-Hartman2011-11-1813-268/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the drivers in drivers/staging/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: "David Täht" <d@teklibre.com> Cc: Marek Belisko <marek.belisko@gmail.com> Cc: Al Cho <acho@novell.com> Cc: Forest Bond <forest@alittletooquiet.net> Cc: Pavel Machek <pavel@ucw.cz> Cc: Huajun Li <huajun.li.lee@gmail.com> Cc: Zac Storer <zac.3.14159@gmail.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: edwin_rong <edwin_rong@realsil.com.cn> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: Julia Lawall <julia@diku.dk> Cc: Ilia Mirkin <imirkin@alum.mit.edu> Cc: Joe Perches <joe@perches.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert drivers/usb/* to use module_usb_driver()Greg Kroah-Hartman2011-11-1840-675/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the drivers in drivers/usb/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Simon Arlott <cxacru@fire.lp0.eu> Cc: Duncan Sands <duncan.sands@free.fr> Cc: Matthieu CASTET <castet.matthieu@free.fr> Cc: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: Oliver Neukum <oliver@neukum.name> Cc: Juergen Stuber <starblue@users.sourceforge.net> Cc: Cesar Miquel <miquel@df.uba.ar> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: Matthew Wilcox <willy@linux.intel.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Michael Hund <mhund@ld-didactic.de> Cc: Zack Parsons <k3bacon@gmail.com> Cc: Melchior FRANZ <mfranz@aon.at> Cc: Tomoki Sekiyama <tomoki.sekiyama@gmail.com> Cc: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Add helper macro for usb_driver boilerplateGreg Kroah-Hartman2011-11-171-0/+12
| | | | | | | | | | | | | | This patch introduces the module_usb_driver macro which is a convenience macro for USB driver modules similar to module_platform_driver. It is intended to be used by drivers which init/exit section does nothing but register/unregister the USB driver. By using this macro it is possible to eliminate a few lines of boilerplate code per USB driver. Based on work done by Lars-Peter Clausen <lars@metafoo.de> for other busses (i2c and spi). Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: Use module_spi_driver to register SPI driverLars-Peter Clausen2011-11-1747-567/+47
| | | | | | | | | | | Use the newly introduced module_spi_driver macro for registering SPI drivers. This allows us to remove a few lines of boilerplate code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: Use module_i2c_driver to register I2C driversLars-Peter Clausen2011-11-1716-207/+16
| | | | | | | | | | Use the newly introduced module_i2c_driver macro for registering I2C drivers. This allows us to remove a few lines of boilerplate code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* SPI: Add helper macro for spi_driver boilerplateLars-Peter Clausen2011-11-171-0/+11
| | | | | | | | | | | | | This patch introduces the module_spi_driver macro which is a convenience macro for SPI driver modules similar to module_platform_driver. It is intended to be used by drivers which init/exit section does nothing but register/unregister the SPI driver. By using this macro it is possible to eliminate a few lines of boilerplate code per SPI driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* I2C: Add helper macro for i2c_driver boilerplateLars-Peter Clausen2011-11-171-0/+13
| | | | | | | | | | | | | | | This patch introduces the module_i2c_driver macro which is a convenience macro for I2C driver modules similar to module_platform_driver. It is intended to be used by drivers which init/exit section does nothing but register/unregister the I2C driver. By using this macro it is possible to eliminate a few lines of boilerplate code per I2C driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivercore: Generalize module_platform_driverLars-Peter Clausen2011-11-172-10/+23
| | | | | | | | | | | | | | | | | | | This patch generalizes the module_platform_driver macro and introduces a new module_driver macro. The module_driver macro takes a driver name, a register and a unregister function for this driver type. Using these it construct the module init and exit sections which register and unregister the driver. Since such init/exit sections are commonly found in drivers this macro can be used to eliminate a lot of boilerplate code. The macro is not intended to be used by driver modules directly, instead it should be used to generate bus specific macros for registering drivers like the module_platform_driver macro. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* W1: w1_therm: release the bus during conversion on externally powered devicesMaciej Szmigiero2011-11-171-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | w1_therm devices can either be bus powered or externally powered. When device is bus powered during temperature conversion the bus have to be left high to provide necessary power. Some masters also allow strong power-up to be enabled in this case. Naturally, no communication over bus can occur during that time. However, if device has external power then there is no such restriction, and host can talk to other devices during temperature conversion. There is command which allows us to check how device is powered, this patch uses it to release the bus on externally w1_therm powered devices during temperature conversion. Also, this changes uninterruptible sleeps there into interruptible ones to avoid long uninterruptible sleep if w1 subsystem happens to grab bus for scan during w1_therm_read(). Signed-off-by: Maciej Szmigiero <mhej@o2.pl> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* devtmpfsd: fix task state handlingKautuk Consul2011-11-151-2/+1
| | | | | | | | | | | | | | - Set the state to TASK_INTERRUPTIBLE using __set_current_state() instead of set_current_state() as the spin_unlock is an implicit memory barrier. - After return from schedule(), there is no need to set the current state to TASK_RUNNING - a call to schedule() always returns in TASK_RUNNING state. Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* lib: devres: add convenience function to remap a resourceWolfram Sang2011-11-153-0/+55
| | | | | | | | | | | | | | Almost every platform_driver does the three steps get_resource, request_mem_region, ioremap. This does not only lead to a lot of code duplication, but also a huge number of similar error strings and inconsistent error codes on failure. So, introduce a helper function which simplifies remapping a resource and make it hard to do something wrong and add documentation for it. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* lib: devres: add annotations for #endifWolfram Sang2011-11-151-2/+2
| | | | | | | | | While working on devres, I found those make navigating the code a tad easier. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Linux 3.2-rc1v3.2-rc1Linus Torvalds2011-11-071-3/+3
| | | | | | .. with new name. Because nothing says "really solid kernel release" like naming it after an extinct animal that just happened to be in the news lately.
* Merge branch 'fixes' of ↵Linus Torvalds2011-11-0742-402/+345
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (31 commits) ARM: OMAP: Fix export.h or module.h includes ARM: OMAP: omap_device: Include linux/export.h ARM: OMAP2: Fix H4 matrix keyboard warning ARM: OMAP1: Remove unused omap-alsa.h ARM: OMAP1: Fix warnings about enabling 32 KiHz timer ARM: OMAP2+: timer: Remove omap_device_pm_latency ARM: OMAP2+: clock data: Remove redundant timer clkdev ARM: OMAP: Devkit8000: Remove double omap_mux_init_gpio ARM: OMAP: usb: musb: OMAP: Delete unused function MAINTAINERS: Update linux-omap git repository ARM: OMAP: change get_context_loss_count ret value to int ARM: OMAP4: hsmmc: configure SDMMC1_DR0 properly ARM: OMAP4: hsmmc: Fix Pbias configuration on regulator OFF ARM: OMAP3: hwmod: fix variant registration and remove SmartReflex from common list ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on success ARM: OMAP: dmtimer: Include linux/module.h ARM: OMAP2+: l3-noc: Include linux/module.h ARM: OMAP2+: devices: Fixes for McPDM ARM: OMAP: Fix errors and warnings when building for one board ARM: OMAP3: PM: restrict erratum i443 handling to OMAP3430 only ...
| * Merge branch 'fixes-modulesplit' into fixesTony Lindgren2011-11-073863-39041/+82624
| |\
| | * ARM: OMAP: Fix export.h or module.h includesTony Lindgren2011-11-074-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 32aaeffbd4a7457bf2f7448b33b5946ff2a960eb (Merge branch 'modsplit-Oct31_2011'...) caused some build errors. Fix these and make sure we always have export.h or module.h included for MODULE_ and EXPORT_SYMBOL users: $ grep -rl ^MODULE_ arch/arm/*omap*/*.c | xargs \ grep -L linux/module.h arch/arm/mach-omap2/dsp.c arch/arm/mach-omap2/mailbox.c arch/arm/mach-omap2/omap-iommu.c arch/arm/mach-omap2/smartreflex.c Also check we either have export.h or module.h included for the files exporting symbols: $ grep -rl EXPORT_SYMBOL arch/arm/*omap*/*.c | xargs \ grep -L linux/export.h | xargs grep -L linux/module.h Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Tony Lindgren <tony@atomide.com>
| | * ARM: OMAP: omap_device: Include linux/export.hAxel Lin2011-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include linux/export.h to fix below build warning: CC arch/arm/plat-omap/omap_device.o arch/arm/plat-omap/omap_device.c:1055: warning: data definition has no type or storage class arch/arm/plat-omap/omap_device.c:1055: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' arch/arm/plat-omap/omap_device.c:1055: warning: parameter names (without types) in function declaration Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP2: Fix H4 matrix keyboard warningTony Lindgren2011-11-041-53/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert to use matrix keyboard to remove the warning "Please update the board to use matrix-keypad driver". Based on similar setup in palmtc.c. Note that this patch is compile tested only because of lack of working hardware. Signed-off-by: Tony Lindgren <tony@atomide.com>
OpenPOWER on IntegriCloud