1. 14 Dec, 2011 3 commits
    • Kay Sievers's avatar
      rtmutex-tester: convert sysdev_class to a regular subsystem · 997d3eaf
      Kay Sievers authored
      After all sysdev classes are ported to regular driver core entities, the
      sysdev implementation will be entirely removed from the kernel.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      997d3eaf
    • Kay Sievers's avatar
      driver-core: implement 'sysdev' functionality for regular devices and buses · ca22e56d
      Kay Sievers authored
      All sysdev classes and sysdev devices will converted to regular devices
      and buses to properly hook userspace into the event processing.
      
      There is no interesting difference between a 'sysdev' and 'device' which
      would justify to roll an entire own subsystem with different userspace
      export semantics. Userspace relies on events and generic sysfs subsystem
      infrastructure from sysdev devices, which are currently not properly
      available.
      
      Every converted sysdev class will create a regular device with the class
      name in /sys/devices/system and all registered devices will becom a children
      of theses devices.
      
      For compatibility reasons, the sysdev class-wide attributes are created
      at this parent device. (Do not copy that logic for anything new, subsystem-
      wide properties belong to the subsystem, not to some fake parent device
      created in /sys/devices.)
      
      Every sysdev driver is implemented as a simple subsystem interface now,
      and no longer called a driver.
      
      After all sysdev classes are ported to regular driver core entities, the
      sysdev implementation will be entirely removed from the kernel.
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ca22e56d
    • Greg Kroah-Hartman's avatar
      kref: fix up the kfree build problems · 6261ddee
      Greg Kroah-Hartman authored
      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: default avatarStephen 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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6261ddee
  2. 13 Dec, 2011 3 commits
    • Peter Zijlstra's avatar
      kref: Remove the memory barriers · 3c8ed889
      Peter Zijlstra authored
      Commit 1b0b3b99 ("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: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3c8ed889
    • Peter Zijlstra's avatar
      kref: Implement kref_put in terms of kref_sub · 47dbd7d9
      Peter Zijlstra authored
      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: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      47dbd7d9
    • Peter Zijlstra's avatar
      kref: Inline all functions · 4af679cd
      Peter Zijlstra authored
      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: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/n/tip-8eccvi2ur2fzgi00xdjlbf5z@git.kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4af679cd
  3. 12 Dec, 2011 5 commits
  4. 10 Dec, 2011 5 commits
  5. 27 Nov, 2011 6 commits
  6. 22 Nov, 2011 1 commit
  7. 18 Nov, 2011 13 commits
    • Alessandro Rubini's avatar
      usb: dwc3: fix a warning · 42b4d114
      Alessandro Rubini authored
      The previous patch left an unused variable, I apologize.
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      42b4d114
    • Alessandro Rubini's avatar
    • Alessandro Rubini's avatar
      usb: dwc3: use debugfs_print_regs32() · c8d2a6f3
      Alessandro Rubini authored
      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: default avatarAlessandro Rubini <rubini@gnudd.com>
      Acked-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c8d2a6f3
    • Alessandro Rubini's avatar
      debugfs: add tools to printk 32-bit registers · 1a087c6a
      Alessandro Rubini authored
      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: default avatarAlessandro Rubini <rubini@gnudd.com>
      Acked-by: default avatarGiancarlo Asnaghi <giancarlo.asnaghi@st.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1a087c6a
    • Greg Kroah-Hartman's avatar
      USB: convert some miscellanies drivers to use module_usb_driver() · fe748483
      Greg Kroah-Hartman authored
      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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fe748483
    • Greg Kroah-Hartman's avatar
      USB: convert sound/* to use module_usb_driver() · 424f0750
      Greg Kroah-Hartman authored
      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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      424f0750
    • Greg Kroah-Hartman's avatar
      USB: convert drivers/hid/* to use module_usb_driver() · 42f06a13
      Greg Kroah-Hartman authored
      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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      42f06a13
    • Greg Kroah-Hartman's avatar
      USB: convert drivers/input/* to use module_usb_driver() · 08642e7c
      Greg Kroah-Hartman authored
      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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      08642e7c
    • Greg Kroah-Hartman's avatar
      USB: convert drivers/bluetooth/* to use module_usb_driver() · 93f1508c
      Greg Kroah-Hartman authored
      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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      93f1508c
    • Greg Kroah-Hartman's avatar
      USB: convert drivers/media/* to use module_usb_driver() · ecb3b2b3
      Greg Kroah-Hartman authored
      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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ecb3b2b3
    • Greg Kroah-Hartman's avatar
      USB: convert drivers/net/* to use module_usb_driver() · d632eb1b
      Greg Kroah-Hartman authored
      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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d632eb1b
    • Greg Kroah-Hartman's avatar
      USB: convert drivers/staging/* to use module_usb_driver() · bac2c126
      Greg Kroah-Hartman authored
      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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bac2c126
    • Greg Kroah-Hartman's avatar
      USB: convert drivers/usb/* to use module_usb_driver() · 65db4305
      Greg Kroah-Hartman authored
      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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      65db4305
  8. 17 Nov, 2011 4 commits