Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Jan 2009 01:02:07 +0000 (17:02 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Jan 2009 01:02:07 +0000 (17:02 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (60 commits)
  uio: make uio_info's name and version const
  UIO: Documentation for UIO ioport info handling
  UIO: Pass information about ioports to userspace (V2)
  UIO: uio_pdrv_genirq: allow custom irq_flags
  UIO: use pci_ioremap_bar() in drivers/uio
  arm: struct device - replace bus_id with dev_name(), dev_set_name()
  libata: struct device - replace bus_id with dev_name(), dev_set_name()
  avr: struct device - replace bus_id with dev_name(), dev_set_name()
  block: struct device - replace bus_id with dev_name(), dev_set_name()
  chris: struct device - replace bus_id with dev_name(), dev_set_name()
  dmi: struct device - replace bus_id with dev_name(), dev_set_name()
  gadget: struct device - replace bus_id with dev_name(), dev_set_name()
  gpio: struct device - replace bus_id with dev_name(), dev_set_name()
  gpu: struct device - replace bus_id with dev_name(), dev_set_name()
  hwmon: struct device - replace bus_id with dev_name(), dev_set_name()
  i2o: struct device - replace bus_id with dev_name(), dev_set_name()
  IA64: struct device - replace bus_id with dev_name(), dev_set_name()
  i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name()
  infiniband: struct device - replace bus_id with dev_name(), dev_set_name()
  ISDN: struct device - replace bus_id with dev_name(), dev_set_name()
  ...

1  2 
drivers/message/i2o/device.c
drivers/misc/tifm_7xx1.c
include/linux/kernel.h
init/Kconfig

index c455da4ff4116dfc727741786a08ade1b822ffda,a7dd03e8d3321e892ec780f44991c6ddd5b5abd0..0ee4264f5db772a6cb27594b5ce51906901fe3cf
@@@ -52,6 -52,7 +52,6 @@@ static inline int i2o_device_issue_clai
  /**
   *    i2o_device_claim - claim a device for use by an OSM
   *    @dev: I2O device to claim
 - *    @drv: I2O driver which wants to claim the device
   *
   *    Do the leg work to assign a device to a given OSM. If the claim succeeds,
   *    the owner is the primary. If the attempt fails a negative errno code
@@@ -79,6 -80,7 +79,6 @@@ int i2o_device_claim(struct i2o_device 
  /**
   *    i2o_device_claim_release - release a device that the OSM is using
   *    @dev: device to release
 - *    @drv: driver which claimed the device
   *
   *    Drop a claim by an OSM on a given I2O device.
   *
@@@ -132,7 -134,7 +132,7 @@@ static void i2o_device_release(struct d
  {
        struct i2o_device *i2o_dev = to_i2o_device(dev);
  
-       pr_debug("i2o: device %s released\n", dev->bus_id);
+       pr_debug("i2o: device %s released\n", dev_name(dev));
  
        kfree(i2o_dev);
  }
@@@ -227,8 -229,8 +227,8 @@@ static int i2o_device_add(struct i2o_co
  
        i2o_dev->lct_data = *entry;
  
-       snprintf(i2o_dev->device.bus_id, BUS_ID_SIZE, "%d:%03x", c->unit,
-                i2o_dev->lct_data.tid);
+       dev_set_name(&i2o_dev->device, "%d:%03x", c->unit,
+                    i2o_dev->lct_data.tid);
  
        i2o_dev->iop = c;
        i2o_dev->device.parent = &c->device;
  
        i2o_driver_notify_device_add_all(i2o_dev);
  
-       pr_debug("i2o: device %s added\n", i2o_dev->device.bus_id);
+       pr_debug("i2o: device %s added\n", dev_name(&i2o_dev->device));
  
        return 0;
  
diff --combined drivers/misc/tifm_7xx1.c
index af6173319e070c9f041506bced6e38c7edac701a,e71eba31decb6b3da19b71636a0b9713e628e7c7..be5672a98702615bb21585871ad0b2deefc8efdb
@@@ -164,7 -164,7 +164,7 @@@ static void tifm_7xx1_switch_media(stru
                if (sock) {
                        printk(KERN_INFO
                               "%s : demand removing card from socket %u:%u\n",
-                              fm->dev.bus_id, fm->id, cnt);
+                              dev_name(&fm->dev), fm->id, cnt);
                        fm->sockets[cnt] = NULL;
                        sock_addr = sock->addr;
                        spin_unlock_irqrestore(&fm->lock, flags);
@@@ -354,7 -354,8 +354,7 @@@ static int tifm_7xx1_probe(struct pci_d
        fm->has_ms_pif = tifm_7xx1_has_ms_pif;
        pci_set_drvdata(dev, fm);
  
 -      fm->addr = ioremap(pci_resource_start(dev, 0),
 -                         pci_resource_len(dev, 0));
 +      fm->addr = pci_ioremap_bar(dev, 0);
        if (!fm->addr)
                goto err_out_free;
  
diff --combined include/linux/kernel.h
index 721984844c94c2939d0515de1678101bee89edfd,d242fe1381fd87e0f0d654f5f968806a53d58492..6b8e2027165eb9e810978dfaaf363174ab767cf4
@@@ -48,12 -48,6 +48,12 @@@ extern const char linux_proc_banner[]
  #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
  #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
  #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
 +#define DIV_ROUND_CLOSEST(x, divisor)(                        \
 +{                                                     \
 +      typeof(divisor) __divisor = divisor;            \
 +      (((x) + ((__divisor) / 2)) / (__divisor));      \
 +}                                                     \
 +)
  
  #define _RET_IP_              (unsigned long)__builtin_return_address(0)
  #define _THIS_IP_  ({ __label__ __here; __here: (unsigned long)&&__here; })
@@@ -355,13 -349,13 +355,13 @@@ static inline char *pack_hex_byte(char 
          printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
  
  /* If you are writing a driver, please use dev_dbg instead */
- #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
+ #if defined(DEBUG)
+ #define pr_debug(fmt, ...) \
+       printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
+ #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
  #define pr_debug(fmt, ...) do { \
        dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
        } while (0)
- #elif defined(DEBUG)
- #define pr_debug(fmt, ...) \
-       printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
  #else
  #define pr_debug(fmt, ...) \
        ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })
diff --combined init/Kconfig
index 315a6114bf87b976888fa76cca3151af090113fe,d9d3dbabdb181df5e0b0ad35c278753f83725282..e7893b1d3e425767b5f765b8c829c401d7a4dea7
@@@ -423,27 -423,37 +423,37 @@@ config SYSFS_DEPRECATE
        bool
  
  config SYSFS_DEPRECATED_V2
-       bool "Create deprecated sysfs files"
+       bool "Create deprecated sysfs layout for older userspace tools"
        depends on SYSFS
        default y
        select SYSFS_DEPRECATED
        help
-         This option creates deprecated symlinks such as the
-         "device"-link, the <subsystem>:<name>-link, and the
-         "bus"-link. It may also add deprecated key in the
-         uevent environment.
-         None of these features or values should be used today, as
-         they export driver core implementation details to userspace
-         or export properties which can't be kept stable across kernel
-         releases.
-         If enabled, this option will also move any device structures
-         that belong to a class, back into the /sys/class hierarchy, in
-         order to support older versions of udev and some userspace
-         programs.
-         If you are using a distro with the most recent userspace
-         packages, it should be safe to say N here.
+         This option switches the layout of sysfs to the deprecated
+         version.
+         The current sysfs layout features a unified device tree at
+         /sys/devices/, which is able to express a hierarchy between
+         class devices. If the deprecated option is set to Y, the
+         unified device tree is split into a bus device tree at
+         /sys/devices/ and several individual class device trees at
+         /sys/class/. The class and bus devices will be connected by
+         "<subsystem>:<name>" and the "device" links. The "block"
+         class devices, will not show up in /sys/class/block/. Some
+         subsystems will suppress the creation of some devices which
+         depend on the unified device tree.
+         This option is not a pure compatibility option that can
+         be safely enabled on newer distributions. It will change the
+         layout of sysfs to the non-extensible deprecated version,
+         and disable some features, which can not be exported without
+         confusing older userspace tools. Since 2007/2008 all major
+         distributions do not enable this option, and ship no tools which
+         depend on the deprecated layout or this option.
+         If you are using a new kernel on an older distribution, or use
+         older userspace tools, you might need to say Y here. Do not say Y,
+         if the original kernel, that came with your distribution, has
+         this option set to N.
  
  config PROC_PID_CPUSET
        bool "Include legacy /proc/<pid>/cpuset file"
@@@ -838,6 -848,10 +848,6 @@@ config RT_MUTEXE
        boolean
        select PLIST
  
 -config TINY_SHMEM
 -      default !SHMEM
 -      bool
 -
  config BASE_SMALL
        int
        default 0 if BASE_FULL