1. 28 4月, 2007 3 次提交
  2. 10 3月, 2007 1 次提交
  3. 17 2月, 2007 2 次提交
    • R
      PCI/sysfs/kobject kernel-doc fixes · f95d882d
      Randy Dunlap 提交于
      Fix kernel-doc warnings in PCI, sysfs, and kobject files.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f95d882d
    • M
      kobject: kobj->k_name verification fix · 13507701
      Martin Stoilov 提交于
      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: NMartin Stoilov <mstoilov@odesys.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      13507701
  4. 12 2月, 2007 1 次提交
  5. 08 2月, 2007 4 次提交
    • E
      sysfs: Shadow directory support · b592fcfe
      Eric W. Biederman 提交于
      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: NEric W. Biederman <ebiederm@xmission.com>
      Cc: Maneesh Soni <maneesh@in.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b592fcfe
    • M
      kobject: kobject_put cleanup · b067db49
      Mariusz Kozlowski 提交于
      This patch removes redundant argument checks for kobject_put().
      Signed-off-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b067db49
    • C
      driver core: Allow device_move(dev, NULL). · c744aeae
      Cornelia Huck 提交于
      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: NCornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c744aeae
    • G
      Kobject: make kobject apis more robust in handling NULL pointers · 31b9025a
      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 <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      31b9025a
  6. 08 12月, 2006 1 次提交
  7. 02 12月, 2006 1 次提交
  8. 11 10月, 2006 1 次提交
  9. 26 9月, 2006 1 次提交
  10. 22 6月, 2006 1 次提交
  11. 22 5月, 2006 1 次提交
  12. 28 4月, 2006 1 次提交
  13. 15 4月, 2006 1 次提交
    • N
      [PATCH] sysfs: Allow sysfs attribute files to be pollable · 4508a7a7
      NeilBrown 提交于
      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 pollable
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4508a7a7
  14. 21 3月, 2006 2 次提交
  15. 07 2月, 2006 2 次提交
  16. 05 1月, 2006 1 次提交
  17. 31 10月, 2005 1 次提交
    • T
      [PATCH] fix missing includes · 4e57b681
      Tim Schmielau 提交于
      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: NTim Schmielau <tim@physik3.uni-rostock.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4e57b681
  18. 28 10月, 2005 1 次提交
  19. 21 6月, 2005 1 次提交
  20. 01 5月, 2005 1 次提交
  21. 19 4月, 2005 1 次提交
  22. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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!
      1da177e4