10 Mar, 2007
1 commit
-
If error happen we jump to "out" label, in this case new_device not yet
became the parent but it wasn't putted.Signed-off-by: Monakhov Dmitriy
Signed-off-by: Greg Kroah-Hartman
20 Feb, 2007
1 commit
-
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
PCI: Make PCI device numa-node attribute visible in sysfs
PCI: add systems for automatic breadth-first device sorting
PCI: PCI devices get assigned redundant IRQs
PCI: Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE boot options
PCI: pci.txt fix __devexit() usage
PCI/sysfs/kobject kernel-doc fixes
17 Feb, 2007
2 commits
-
Fix kernel-doc warnings in PCI, sysfs, and kobject files.
Signed-off-by: Randy Dunlap
Signed-off-by: Greg Kroah-Hartman -
The function 'kobject_add' tries to verify the name of
a new kobject instance is properly set before continuing.
if (!kobj->k_name)
kobj->k_name = kobj->name;
if (!kobj->k_name) {
pr_debug("kobject attempted to be registered with no name!\n");
WARN_ON(1);
return -EINVAL;
}
The statement:
if (!kobj->k_name) {
pr_debug("kobject attempted to be registered with no name!\n");
WARN_ON(1);
return -EINVAL;
}
is useless the way it is right now, because it can never be true. I
think the
code was intended to be:
if (!kobj->k_name)
kobj->k_name = kobj->name;
if (!*kobj->k_name) {
pr_debug("kobject attempted to be registered with no name!\n");
WARN_ON(1);
return -EINVAL;
}
because this would make sure the kobj->name buffer has something in it.
So the missing '*' is just a typo. Although, I would much prefer
expression like:
if (*kobj->k_name == '\0') {
pr_debug("kobject attempted to be registered with no name!\n");
WARN_ON(1);
return -EINVAL;
}because this would've made the intention clear, in this patch I just restore
the missing '*' without changing the coding style of the function.Signed-off-by: Martin Stoilov
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman
12 Feb, 2007
1 commit
-
A variety of (mostly) innocuous fixes to the embedded kernel-doc content in
source files, including:* make multi-line initial descriptions single line
* denote some function names, constants and structs as such
* change erroneous opening '/*' to '/**' in a few places
* reword some text for claritySigned-off-by: Robert P. J. Day
Cc: "Randy.Dunlap"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Feb, 2007
4 commits
-
The problem. When implementing a network namespace I need to be able
to have multiple network devices with the same name. Currently this
is a problem for /sys/class/net/*.What I want is a separate /sys/class/net directory in sysfs for each
network namespace, and I want to name each of them /sys/class/net.I looked and the VFS actually allows that. All that is needed is
for /sys/class/net to implement a follow link method to redirect
lookups to the real directory you want.Implementing a follow link method that is sensitive to the current
network namespace turns out to be 3 lines of code so it looks like a
clean approach. Modifying sysfs so it doesn't get in my was is a bit
trickier.I am calling the concept of multiple directories all at the same path
in the filesystem shadow directories. With the directory entry really
at that location the shadow master.The following patch modifies sysfs so it can handle a directory
structure slightly different from the kobject tree so I can implement
the shadow directories for handling /sys/class/net/.Signed-off-by: Eric W. Biederman
Cc: Maneesh Soni
Signed-off-by: Greg Kroah-Hartman -
This patch removes redundant argument checks for kobject_put().
Signed-off-by: Mariusz Kozlowski
Signed-off-by: Greg Kroah-Hartman -
If we allow NULL as the new parent in device_move(), we need to make sure
that the device is placed into the same place as it would if it was
newly registered:- Consider the device virtual tree. In order to be able to reuse code,
setup_parent() has been tweaked a bit.
- kobject_move() can fall back to the kset's kobject.
- sysfs_move_dir() uses the sysfs root dir as fallback.Signed-off-by: Cornelia Huck
Cc: Marcel Holtmann
Signed-off-by: Greg Kroah-Hartman -
It should be ok to pass in NULL for some kobject functions, so add error
checking for all exported kobject functions to be more robust.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
08 Dec, 2006
1 commit
-
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
02 Dec, 2006
1 commit
-
Provide a function device_move() to move a device to a new parent device. Add
auxilliary functions kobject_move() and sysfs_move_dir().
kobject_move() generates a new uevent of type KOBJ_MOVE, containing the
previous path (DEVPATH_OLD) in addition to the usual values. For this, a new
interface kobject_uevent_env() is created that allows to add further
environmental data to the uevent at the kobject layer.Signed-off-by: Cornelia Huck
Acked-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
11 Oct, 2006
1 commit
-
Signed-off-by: Dmitry Torokhov
26 Sep, 2006
1 commit
-
Check all __must_check warnings in lib/kobject.c
Signed-off-by: Randy Dunlap
Signed-off-by: Greg Kroah-Hartman
22 Jun, 2006
1 commit
-
These really need to be fixed, shout it out to the world.
Signed-off-by: Greg Kroah-Hartman
22 May, 2006
1 commit
-
People don't like released kernels yelling at them, no matter how real the
error might be. So only report it if CONFIG_KOBJECT_DEBUG is enabled.Sent on request of Andrew Morton.
(akpm: should bring this back post-2.6.17)
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Apr, 2006
1 commit
-
This patch contains the following possible cleanups:
- #if 0 the following unused global function:
- subsys_remove_file()
- remove the following unused EXPORT_SYMBOL's:
- kset_find_obj
- subsystem_init
- remove the following unused EXPORT_SYMBOL_GPL:
- kobject_add_dirSigned-off-by: Adrian Bunk
Signed-off-by: Greg Kroah-Hartman
15 Apr, 2006
1 commit
-
It works like this:
Open the file
Read all the contents.
Call poll requesting POLLERR or POLLPRI (so select/exceptfds works)
When poll returns,
close the file and go to top of loop.
or lseek to start of file and go back to the 'read'.Events are signaled by an object manager calling
sysfs_notify(kobj, dir, attr);If the dir is non-NULL, it is used to find a subdirectory which
contains the attribute (presumably created by sysfs_create_group).This has a cost of one int per attribute, one wait_queuehead per kobject,
one int per open file.The name "sysfs_notify" may be confused with the inotify
functionality. Maybe it would be nice to support inotify for sysfs
attributes as well?This patch also uses sysfs_notify to allow /sys/block/md*/md/sync_action
to be pollableSigned-off-by: Neil Brown
Signed-off-by: Greg Kroah-Hartman
21 Mar, 2006
2 commits
-
Adding kobject_add_dir() function which creates a subdirectory
for a given kobject.Signed-off-by: Jun'ichi Nomura
Signed-off-by: Greg Kroah-Hartman -
Now that kobject_add() is used more than kobject_register() the kernel
wasn't always letting people know that they were doing something wrong.
This change fixes this.Signed-off-by: Greg Kroah-Hartman
07 Feb, 2006
2 commits
-
kobject_get_path() will oops if one of the component names is
NULL. Fix that by returning NULL instead of oopsing.Signed-off-by: Chuck Ebbert
Signed-off-by: Greg Kroah-Hartman -
So we might as well check to verify this, and let the user know that
something is wrong if they didn't do it correctly, instead of oopsing
later on in kobject_get_name() or somewhere else.Signed-off-by: Greg Kroah-Hartman
05 Jan, 2006
1 commit
-
Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
31 Oct, 2005
1 commit
-
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
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Oct, 2005
1 commit
-
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
21 Jun, 2005
1 commit
-
kobject: make kobject's name const char * since users should not
attempt to change it (except by calling kobject_rename).Signed-off-by: Dmitry Torokhov
Signed-off-by: Greg Kroah-Hartman
01 May, 2005
1 commit
-
Some KernelDoc descriptions are updated to match the current code.
No code changes.Signed-off-by: Martin Waitz
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Apr, 2005
1 commit
-
kobject_add() and kobject_del() don't emit hotplug events anymore.
The user should do it itself if it has finished populating the device
directory.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
17 Apr, 2005
1 commit
-
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.Let it rip!