14 Oct, 2007

1 commit


13 Oct, 2007

21 commits

  • This patch (as993) merges the suspend.c and resume.c files in
    drivers/base/power into main.c, making some public symbols private.

    Signed-off-by: Alan Stern
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This makes it a bit more sane when trying to figure out how to clean up
    the ktype mess.

    Based on a larger patch from Kay Sievers

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This makes it a bit more sane when trying to figure out how to clean up
    the ktype mess.

    Based on a larger patch from Kay Sievers

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This makes it a bit more sane when trying to figure out how to clean up
    the ktype mess.

    Based on a larger patch from Kay Sievers

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • There is only one user of it, and it is only a wrapper for kset_init().

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • While platform_device.id is a u32, platform_device_add() handles "-1"
    as a special id value. This has potential for confusion and bugs.
    Making it an int instead should prevent problems from happening in
    the future.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • 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
    Cc: Tejun Heo
    Acked-by: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Akinobu Mita
     
  • suspend_device() and resume_device() can now become static.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Adrian Bunk
     
  • following patch fixes the i2c name collision with i2c-dev.

    http://mcentral.de/wiki/index.php/Bugtracker#i2c_core_problem

    This issue has been experienced with em28xx and saa7133 based devices.
    I discussed that problem with Jean Delvare a while ago and he proposed
    to add a prefix to the class name.

    Signed-off-by: Markus Rechberger
    Acked-by: Marcel Holtmann
    Signed-off-by: Greg Kroah-Hartman

    Markus Rechberger
     
  • This has been in the SuSE kernels for some time now.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Move uevent specific logic from the core into kobject_uevent.c, which
    does no longer require to link the unused string array if hotplug
    is not compiled in.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • get_bus() should not be globally visable as it is not used by anything
    other than drivers/base/bus.c. This patch removes the visability of it,
    and renames it to match all of the other *_get() functions in the
    kernel.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • put_bus() should not be globally visable as it is not used by anything
    other than drivers/base/bus.c. This patch removes the visability of it,
    and renames it to match all of the other *_put() functions in the
    kernel.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • There are no more subsystems, it's a kset now so remove the function and
    the only two users, which are in the driver core.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • There are no more subsystems, it's a kset now so remove the function and
    the only two users, which are in the driver core.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • 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

    Greg Kroah-Hartman
     
  • 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

    Greg Kroah-Hartman
     
  • The kernel creates a process for every event that is send, even when
    there is no binary it could execute. We are needlessly creating around
    200-300 failing processes during early bootup, until we have the chance
    to disable it from userspace.

    This change allows us to disable /sbin/hotplug entirely, if you want to,
    by setting UEVENT_HELPER_PATH="" in the kernel config.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • This changes the uevent buffer functions to use a struct instead of a
    long list of parameters. It does no longer require the caller to do the
    proper buffer termination and size accounting, which is currently wrong
    in some places. It fixes a known bug where parts of the uevent
    environment are overwritten because of wrong index calculations.

    Many thanks to Mathieu Desnoyers for finding bugs and improving the
    error handling.

    Signed-off-by: Kay Sievers
    Cc: Mathieu Desnoyers
    Cc: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Attributes do not have an owner(module) anymore, so there is no need
    to carry the attributes in every single bus instance.

    Signed-off-by: Kay Sievers
    Acked-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Prefix platform modalias strings with "platform:", which
    modprobe config to blacklist alias resolving if userspace
    configures it.

    Send uevents for all platform devices.

    Add MODULE_ALIAS's to: pxa2xx_pcmcia, ds1742 and pcspkr to trigger
    module autoloading by userspace.

    $ modinfo pcspkr
    alias: platform:pcspkr
    license: GPL
    description: PC Speaker beeper driver
    ...

    $ modprobe -n -v platform:pcspkr
    insmod /lib/modules/2.6.23-rc3-g28e8351a-dirty/kernel/drivers/input/misc/pcspkr.ko

    Signed-off-by: Kay Sievers
    Cc: David Brownell
    Cc: Atsushi Nemoto
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

08 Oct, 2007

1 commit


27 Sep, 2007

1 commit

  • As Stephen Hemminger says, this is a "belt and suspenders" patch that
    zeroes the envp array at allocation time, even though all the users
    should NULL-terminate it anyway (and we've hopefully fixed everybody
    that doesn't do that).

    And we'll apparently clean the whole envp thing up for 2.6.24 anyway.

    But let's just be robust, and do both this *and* make sure that all
    users are doing the right thing.

    Acked-by: Stephen Hemminger
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

20 Sep, 2007

1 commit

  • Nested class devices used to have 'device' symlink point to a real
    (physical) device instead of a parent class device. When converting
    subsystems to struct device we need to keep doing what class devices did if
    CONFIG_SYSFS_DEPRECATED is Y, otherwise parts of udev break.

    Signed-off-by: Dmitry Torokhov
    Cc: Kay Sievers
    Acked-by: Greg KH
    Tested-by: Anssi Hannula
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Torokhov
     

01 Aug, 2007

1 commit

  • Is there a reason why the "online" file in the subdirectories for the CPUs
    in /sys/devices/system isn't world-readable? I cannot imagine it to be
    security relevant especially now that a getcpu() syscall can be used to
    determine what CPUa thread runs on.

    The file is useful to correctly implement the sysconf() function to return
    the number of online CPUs. In the presence of hotplug we currently cannot
    provide this information. The patch below should to it.

    Signed-off-by: Ulrich Drepper
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ulrich Drepper
     

31 Jul, 2007

3 commits


30 Jul, 2007

1 commit

  • Introduce CONFIG_SUSPEND representing the ability to enter system sleep
    states, such as the ACPI S3 state, and allow the user to choose SUSPEND
    and HIBERNATION independently of each other.

    Make HOTPLUG_CPU be selected automatically if SUSPEND or HIBERNATION has
    been chosen and the kernel is intended for SMP systems.

    Also, introduce CONFIG_PM_SLEEP which is automatically selected if
    CONFIG_SUSPEND or CONFIG_HIBERNATION is set and use it to select the
    code needed for both suspend and hibernation.

    The top-level power management headers and the ACPI code related to
    suspend and hibernation are modified to use the new definitions (the
    changes in drivers/acpi/sleep/main.c are, mostly, moving code to reduce
    the number of ifdefs).

    There are many other files in which CONFIG_PM can be replaced with
    CONFIG_PM_SLEEP or even with CONFIG_SUSPEND, but they can be updated in
    the future.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

27 Jul, 2007

1 commit

  • Commit bd804eba1c8597cbb7cd5a5f9fe886aae16a079a ("PM: Introduce
    pm_power_off_prepare") caused problems in the poweroff path, as reported by
    YOSHIFUJI Hideaki / 吉藤英明.

    Generally, sysdev_shutdown() should be called after the ACPI preparation for
    powering the system off. To make it happen, we can separate sysdev_shutdown()
    from device_shutdown() and call it directly wherever necessary.

    Signed-off-by: Rafael J. Wysocki
    Tested-by: YOSHIFUJI Hideaki / 吉藤英明
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

22 Jul, 2007

1 commit

  • Signed-off-by: Nigel Cunningham
    Cc: Randy Dunlap
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Acked-by: Linus Torvalds
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     

20 Jul, 2007

1 commit

  • In order to enable things like PM_TRACE, you're required to enable
    PM_DEBUG, which sends a large spew of messages on boot, and often times can
    overflow dmesg buffer.

    Create new PM_VERBOSE and shift that to be the option that enables
    drivers/base/power's messages.

    Signed-off-by: Ben Collins
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Collins
     

19 Jul, 2007

4 commits


17 Jul, 2007

1 commit

  • Using dev_to_node(&dev->dev) to get node, and kmalloc_node to dma buffer on
    corresponding node dma pool

    Signed-off-by: Yinghai Lu
    Cc: Andi Kleen
    Cc: Christoph Lameter
    Cc: David Rientjes
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     

12 Jul, 2007

2 commits

  • Well, first of all, I don't want to change so many files either.

    What I do:
    Adding a new parameter "struct bin_attribute *" in the
    .read/.write methods for the sysfs binary attributes.

    In fact, only the four lines change in fs/sysfs/bin.c and
    include/linux/sysfs.h do the real work.
    But I have to update all the files that use binary attributes
    to make them compatible with the new .read and .write methods.
    I'm not sure if I missed any. :(

    Why I do this:
    For a sysfs attribute, we can get a pointer pointing to the
    struct attribute in the .show/.store method,
    while we can't do this for the binary attributes.
    I don't know why this is different, but this does make it not
    so handy to use the binary attributes as the regular ones.
    So I think this patch is reasonable. :)

    Who benefits from it:
    The patch that exposes ACPI tables in sysfs
    requires such an improvement.
    All the table binary attributes share the same .read method.
    Parameter "struct bin_attribute *" is used to get
    the table signature and instance number which are used to
    distinguish different ACPI table binary attributes.

    Without this parameter, we need to offer different .read methods
    for different ACPI table binary attributes.
    This is impossible as there are various ACPI tables on different
    platforms, and we don't know what they are until they are loaded.

    Signed-off-by: Zhang Rui
    Signed-off-by: Greg Kroah-Hartman

    Zhang Rui
     
  • devt_attr and uevent_attr are either allocated dynamically with or
    embedded in device and class_device as they needed their owner field
    set to the module implementing the driver. Now that sysfs implements
    immediate disconnect and owner field removed from struct attribute,
    there is no reason to do this. Remove these attributes from
    [class_]device and use static attribute structures instead.

    Signed-off-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo