aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/sys.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-01-22driver core: remove drivers/base/sys.c and include/linux/sysdev.hGreg Kroah-Hartman1-383/+0
Now that all users of 'struct sysdev' are removed from the kernel, we can safely remove the .h and .c files for this code, to ensure that no one accidentally starts to use it again. Many thanks for Kay who did all the hard work here on making this happen. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-14driver-core: implement 'sysdev' functionality for regular devices and busesKay Sievers1-9/+1
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: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-11PM: Remove sysdev suspend, resume and shutdown operationsRafael J. Wysocki1-200/+2
Since suspend, resume and shutdown operations in struct sysdev_class and struct sysdev_driver are not used any more, remove them. Also drop sysdev_suspend(), sysdev_resume() and sysdev_shutdown() used for executing those operations and modify all of their users accordingly. This reduces kernel code size quite a bit and reduces its complexity. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi1-7/+7
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-23Introduce ARCH_NO_SYSDEV_OPS config option (v2)Rafael J. Wysocki1-1/+2
Introduce Kconfig option allowing architectures where sysdev operations used during system suspend, resume and shutdown have been completely replaced with struct sycore_ops operations to avoid building sysdev code that will never be used. Make callbacks in struct sys_device and struct sysdev_driver depend on ARCH_NO_SYSDEV_OPS to allows us to verify if all of the references have been actually removed from the code the given architecture depends on. Make x86 select ARCH_NO_SYSDEV_OPS. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-02-03sysdev: Do not register with sysdev when erroring on addBorislav Petkov1-17/+44
When encountering an error while executing the driver's ->add method, we should cancel registration and unwind what we've regged so far. The low level ->add methods do return proper error codes but those aren't looked at in sysdev_driver_register(). Fix that by sharing the unregistering code. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-03sysdev: Fixup warning messageBorislav Petkov1-2/+2
Use gcc's __func__ instead of the function name. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22driver core: Display error codes when class suspend failsMark Brown1-4/+4
Aid diagnostics by printing the error code from failed suspends, which doesn't otherwise seem to get displayed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo1-1/+0
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-07Driver core: Constify struct sysfs_ops in struct kobj_typeEmese Revfy1-2/+2
Constify struct sysfs_ops. This is part of the ops structure constification effort started by Arjan van de Ven et al. Benefits of this constification: * prevents modification of data that is shared (referenced) by many other structure instances at runtime * detects/prevents accidental (but not intentional) modification attempts on archs that enforce read-only kernel data at runtime * potentially better optimized code as the compiler can assume that the const data cannot be changed * the compiler/linker move const data into .rodata and therefore exclude them from false sharing Signed-off-by: Emese Revfy <re.emese@gmail.com> Acked-by: David Teigland <teigland@redhat.com> Acked-by: Matt Domsch <Matt_Domsch@dell.com> Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Acked-by: Hans J. Koch <hjk@linutronix.de> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Jens Axboe <jens.axboe@oracle.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-07sysfs: Add attribute array to sysdev classesAndi Kleen1-1/+8
Add a attribute array that is automatically registered and unregistered to struct sysdev_class. This is similar to what struct class has. A lot of drivers add list of attributes, so it's better to do this easily in the common sysdev layer. This adds a new field to struct sysdev_class. I audited the whole tree and there are no dynamically allocated sysdev classes, so this is fully compatible. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-07sysdev: Pass attribute in sysdev_class attributes show/storeAndi Kleen1-2/+2
Passing the attribute to the low level IO functions allows all kinds of cleanups, by sharing low level IO code without requiring an own function for every piece of data. Also drivers can extend the attributes with own data fields and use that in the low level function. Similar to sysdev_attributes and normal attributes. This is a tree-wide sweep, converting everything in one go. No functional changes in this patch other than passing the new argument everywhere. Tested on x86, the non x86 parts are uncompiled. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add failsXiaotian Feng1-1/+1
If kobject_init_and_add fails, sysdev_register should not send KOBJ_ADD uevent to userspace. Signed-off-by: Xiaotian Feng <dfeng@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-15driver core: fix gcc 4.3.3 warnings about string literalsGreg Kroah-Hartman1-1/+1
This removes the warning: format not a string literal and no format arguments warnings in the driver core that gcc 4.3.3 complains about. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-15driver-core: make sysdev_class_register check kobject_set_name return valueDave Young1-1/+7
sysdev_class_register should check the kobject_set_name return value. Add the return value checking code. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-12PM: Warn if interrupts are enabled during suspend-resume of sysdevsRafael J. Wysocki1-0/+16
Sysdevs have to be suspended and resumed with interrupts disabled and things usually break in a way that's difficult to debug if one of sysdev drivers enables interrupts by mistake during suspend or resume. Add extra checks that will generate warnings in such cases. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2009-04-03Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-1/+1
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits) trivial: Update my email address trivial: NULL noise: drivers/mtd/tests/mtd_*test.c trivial: NULL noise: drivers/media/dvb/frontends/drx397xD_fw.h trivial: Fix misspelling of "Celsius". trivial: remove unused variable 'path' in alloc_file() trivial: fix a pdlfush -> pdflush typo in comment trivial: jbd header comment typo fix for JBD_PARANOID_IOFAIL trivial: wusb: Storage class should be before const qualifier trivial: drivers/char/bsr.c: Storage class should be before const qualifier trivial: h8300: Storage class should be before const qualifier trivial: fix where cgroup documentation is not correctly referred to trivial: Give the right path in Documentation example trivial: MTD: remove EOL from MODULE_DESCRIPTION trivial: Fix typo in bio_split()'s documentation trivial: PWM: fix of #endif comment trivial: fix typos/grammar errors in Kconfig texts trivial: Fix misspelling of firmware trivial: cgroups: documentation typo and spelling corrections trivial: Update contact info for Jochen Hein trivial: fix typo "resgister" -> "register" ...
2009-03-30PM: Rework handling of interrupts during suspend-resumeRafael J. Wysocki1-0/+8
Use the functions introduced in by the previous patch, suspend_device_irqs(), resume_device_irqs() and check_wakeup_irqs(), to rework the handling of interrupts during suspend (hibernation) and resume. Namely, interrupts will only be disabled on the CPU right before suspending sysdevs, while device drivers will be prevented from receiving interrupts, with the help of the new helper function, before their "late" suspend callbacks run (and analogously during resume). In addition, since the device interrups are now disabled before the CPU has turned all interrupts off and the CPU will ACK the interrupts setting the IRQ_PENDING bit for them, check in sysdev_suspend() if any wake-up interrupts are pending and abort suspend if that's the case. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Ingo Molnar <mingo@elte.hu>
2009-03-30trivial: fix typo "thier" -> "their"Uwe Kleine-Koenig1-1/+1
Signed-off-by: Uwe Kleine-Koenig <Uwe.Kleine-Koenig@digi.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-24Driver core: some cleanup on drivers/base/sys.cZhenwen Xu1-27/+27
do some cleanup on drivers/base/sys.c Signed-off-by: Zhenwen Xu <helight.xu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-22PM: Split up sysdev_[suspend|resume] from device_power_[down|up], fixIngo Molnar1-5/+2
Impact: module build fix Fix: ERROR: "sysdev_resume" [arch/x86/kernel/apm.ko] undefined! ERROR: "sysdev_suspend" [arch/x86/kernel/apm.ko] undefined! As these APIs are now used by the APM driver, which can be built as a module. Also fix a few extra (and inconsistent) newlines in comment blocks preceding these functions. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-29sysfs: Fix return values for sysdev_store_{ulong,int}Andi Kleen1-2/+4
SYSFS: Fix return values for sysdev_store_{ulong,int} Always return the full size instead of the consumed length of the string in sysdev_store_{ulong,int} This avoids EINVAL errors in some echo versions. Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-29driver core: drivers/base/sys.c: update commentsQinghuang Feng1-2/+2
There are no functions named sys_device_shutdown or sys_device_suspend in the kernel. They should be fixed to sysdev_shutdown and sysdev_suspend respectively. Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-26Use WARN() in drivers/base/Arjan van de Ven1-8/+4
Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Greg KH <greg@kroah.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-21sysdev: Add utility functions for simple int/ulong variable sysdev attributesAndi Kleen1-0/+49
This adds a new sysdev_ext_attribute that stores a pointer to the variable it manages and some utility functions/macro to easily use them. Previously all users wrote custom macros to generate show/store functions for each variable, with this it is possible to avoid that in many cases. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21sysdev: Pass the attribute to the low level sysdev show/store functionAndi Kleen1-2/+2
This allow to dynamically generate attributes and share show/store functions between attributes. Right now most attributes are generated by special macros and lots of duplicated code. With the attribute passed it's instead possible to attach some data to the attribute and then use that in shared low level functions to do different things. I need this for the dynamically generated bank attributes in the x86 machine check code, but it'll allow some further cleanups. I converted all users in tree to the new show/store prototype. It's a single huge patch to avoid unbisectable sections. Runtime tested: x86-32, x86-64 Compiled only: ia64, powerpc Not compile tested/only grep converted: sh, arm, avr32 Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21sysdev: fix debugging statements in registration code.Ben Dooks1-3/+8
The systdev_class_register() and sysdev_register() functions have pr_debug() statements which are enabled when the user selects the driver core debug. Both of these routines do not produce the correct output, as they make assumptions about data which has not been initialised. In sysdev_class_register() the code uses the kobject_name(&cls->kset.kobj) at the start of the function, but this is not setup until later in the same call. Change this to use cls->name which is passed in from the caller. The sysdev_register() function tries to get the name of the sysdev by kobject_name(&sysdev->kobj), but that isn't setup until later in the same function so change this message to use the name of the sysdev's class and add another message once the name is initialised. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-06Fix bogus warning in sysdev_driver_register()OGAWA Hirofumi1-2/+1
if ((drv->entry.next != drv->entry.prev) || (drv->entry.next != NULL)) { warns list_empty(&drv->entry). Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Greg KH <gregkh@suse.de> Cc: Len Brown <lenb@kernel.org> [ Version 2 totally redone based on suggestions from Linus & Greg ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-19driver core: replace remaining __FUNCTION__ occurrencesHarvey Harrison1-1/+1
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-19sysdev: detect multiple driver registrationsBen Dooks1-0/+16
I've just found how easy it is to accidentally register a sysdev_driver for two different classes. When this happens, bad things happen as the sysdev_driver structure keeps has the list entry for the driver registration. The following patch makes a WARN_ON() if this happens, although I think BUG_ON or returning -EAGAIN could also be valid responses to this. Signed-off-by: Ben Dooks <ben@fluff.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-10sysdev: fix problem with sysdev_class being re-registeredGreg Kroah-Hartman1-0/+4
We need to initialize the kobject for a sysdev_class as it could have been recycled (stupid static kobjects...) We also do the same thing in case sysdev devices are being re-registered. Thanks to Balaji Rao <balajirrao@gmail.com> for pointing out the problem. Signed-off-by: Balaji Rao <balajirrao@gmail.com> Tested-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Driver core: change sysdev classes to use dynamic kobject namesKay Sievers1-0/+1
All kobjects require a dynamically allocated name now. We no longer need to keep track if the name is statically assigned, we can just unconditionally free() all kobject names on cleanup. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Kobject: convert drivers/* from kobject_unregister() to kobject_put()Greg Kroah-Hartman1-1/+1
There is no need for kobject_unregister() anymore, thanks to Kay's kobject cleanup changes, so replace all instances of it with kobject_put(). Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Kobject: change drivers/base/sys.c to use kobject_init_and_addGreg Kroah-Hartman1-10/+6
Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert /sys/devices/system to use kset_createGreg Kroah-Hartman1-16/+11
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert /sys/devices to use kset_createGreg Kroah-Hartman1-3/+1
Dynamically create the kset instead of declaring it statically. We also rename devices_subsys to devices_kset to catch all users of the variable. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: remove struct kobj_type from struct ksetGreg Kroah-Hartman1-1/+2
We don't need a "default" ktype for a kset. We should set this explicitly every time for each kset. This change is needed so that we can make ksets dynamic, and cleans up one of the odd, undocumented assumption that the kset/kobject/ktype model has. This patch is based on a lot of help from Kay Sievers. Nasty bug in the block code was found by Dave Young <hidave.darkstar@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Dave Young <hidave.darkstar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12sysdev: remove global sysdev drivers listAkinobu Mita1-57/+14
No one uses sysdev_drivers. Because no one calls sysdev_driver_register with NULL class. And it is difficult to imagine that someone want to implement a global sysdev driver which is called with all sys_device on any kind of sysdev_class. So this patch removes global sysdev_drivers list and update comments for this change. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Tejun Heo <htejun@gmail.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12Driver core: remove kset_set_kset_sGreg Kroah-Hartman1-1/+1
This macro is only used by the driver core and is held over from when we had subsystems. It is not needed anymore. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-11sysdev: use mutex instead of semaphoreMatthias Kaehlcke1-12/+12
The sysdev code use a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-02remove "struct subsystem" as it is no longer neededGreg Kroah-Hartman1-7/+7
We need to work on cleaning up the relationship between kobjects, ksets and ktypes. The removal of 'struct subsystem' is the first step of this, especially as it is not really needed at all. Thanks to Kay for fixing the bugs in this patch. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-21[PATCH] Driver Core: Allow sysdev_class have attributesShaohua Li1-1/+50
allow sysdev_class adding attribute. Next patch will use the new API to add an attribute under /sys/device/system/cpu/. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-06[PATCH] drivers/base/: proper prototypesAdrian Bunk1-0/+3
This patch contains the following changes: - move prototypes to base.h - sys.c should #include "base.h" for getting the prototype of it's global function system_bus_init() Note that hidden in this patch there's a bugfix: Caller and callee disagreed regarding the return type of sysdev_shutdown(). Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-30[PATCH] fix missing includesTim Schmielau1-0/+1
I recently picked up my older work to remove unnecessary #includes of sched.h, starting from a patch by Dave Jones to not include sched.h from module.h. This reduces the number of indirect includes of sched.h by ~300. Another ~400 pointless direct includes can be removed after this disentangling (patch to follow later). However, quite a few indirect includes need to be fixed up for this. In order to feed the patches through -mm with as little disturbance as possible, I've split out the fixes I accumulated up to now (complete for i386 and x86_64, more archs to follow later) and post them before the real patch. This way this large part of the patch is kept simple with only adding #includes, and all hunks are independent of each other. So if any hunk rejects or gets in the way of other patches, just drop it. My scripts will pick it up again in the next round. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05[PATCH] Driver core: hande sysdev suspend failureShaohua Li1-25/+85
This patch adds the return value check for sysdev suspend and does restore in failure case. Send the patch to pm-list, but seems lost, so I resend it. Signed-off-by: Shaohua Li<shaohua.li@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-12[ACPI] merge acpi-2.6.12 branch into latest Linux 2.6.13-rc...Len Brown1-1/+0
Signed-off-by: Len Brown <len.brown@intel.com>
2005-07-11[ACPI] ACPI poweroff fixAlexey Starikovskiy1-1/+0
Register an "acpi" system device to be notified of shutdown preparation. This depends on CONFIG_PM http://bugzilla.kernel.org/show_bug.cgi?id=4041 Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2005-06-20[PATCH] sysfs: (driver/base) if show/store is missing return -EIODmitry Torokhov1-2/+2
sysfs: fix drivers/base so if an attribute doesn't implement show or store method read/write will return -EIO instead of 0. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-04-16[PATCH] pm_message_t: more fixes in common and i386Pavel Machek1-1/+2
I thought I'm done with fixing u32 vs. pm_message_t ... unfortunately that turned out not to be the case as Russel King pointed out. Here are fixes for Documentation and common code (mainly system devices). Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>