Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
authorLinus Torvalds <torvalds@woody.osdl.org>
Sat, 2 Dec 2006 00:41:27 +0000 (16:41 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sat, 2 Dec 2006 00:41:27 +0000 (16:41 -0800)
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (28 commits)
  PCI: make arch/i386/pci/common.c:pci_bf_sort static
  PCI: ibmphp_pci.c: fix NULL dereference
  pciehp: remove unnecessary pci_disable_msi
  pciehp: remove unnecessary free_irq
  PCI: rpaphp: change device tree examination
  PCI: Change memory allocation for acpiphp slots
  i2c-i801: SMBus patch for Intel ICH9
  PCI: irq: irq and pci_ids patch for Intel ICH9
  PCI: pci_{enable,disable}_device() nestable ports
  PCI: switch pci_{enable,disable}_device() to be nestable
  PCI: arch/i386/kernel/pci-dma.c: ioremap balanced with iounmap
  pci/i386: style cleanups
  PCI: Block on access to temporarily unavailable pci device
  pci: fix __pci_register_driver error handling
  pci: clear osc support flags if no _OSC method
  acpiphp: fix missing acpiphp_glue_exit()
  acpiphp: fix use of list_for_each macro
  Altix: Initial ACPI support - ROM shadowing.
  Altix: SN ACPI hotplug support.
  Altix: Add initial ACPI IO support
  ...

242 files changed:
Documentation/Changes
Documentation/DMA-API.txt
Documentation/DMA-ISA-LPC.txt
Documentation/MSI-HOWTO.txt
Documentation/accounting/taskstats.txt
Documentation/block/biodoc.txt
Documentation/cpu-freq/cpufreq-nforce2.txt
Documentation/cpu-hotplug.txt
Documentation/devices.txt
Documentation/driver-model/platform.txt
Documentation/driver-model/porting.txt
Documentation/dvb/ci.txt
Documentation/eisa.txt
Documentation/filesystems/adfs.txt
Documentation/filesystems/configfs/configfs.txt
Documentation/filesystems/fuse.txt
Documentation/filesystems/hpfs.txt
Documentation/filesystems/ntfs.txt
Documentation/filesystems/ocfs2.txt
Documentation/filesystems/proc.txt
Documentation/filesystems/spufs.txt
Documentation/fujitsu/frv/gdbstub.txt
Documentation/fujitsu/frv/kernel-ABI.txt
Documentation/ide.txt
Documentation/input/amijoy.txt
Documentation/input/atarikbd.txt
Documentation/input/yealink.txt
Documentation/ioctl/cdrom.txt
Documentation/kbuild/makefiles.txt
Documentation/keys.txt
Documentation/laptop-mode.txt
Documentation/memory-barriers.txt
Documentation/networking/NAPI_HOWTO.txt
Documentation/networking/cs89x0.txt
Documentation/networking/iphase.txt
Documentation/networking/packet_mmap.txt
Documentation/networking/pktgen.txt
Documentation/networking/proc_net_tcp.txt
Documentation/networking/sk98lin.txt
Documentation/networking/slicecom.txt
Documentation/networking/wan-router.txt
Documentation/pnp.txt
Documentation/power/pci.txt
Documentation/power/states.txt
Documentation/power/swsusp.txt
Documentation/powerpc/booting-without-of.txt
Documentation/robust-futex-ABI.txt
Documentation/robust-futexes.txt
Documentation/s390/crypto/crypto-API.txt
Documentation/scsi/aic79xx.txt
Documentation/scsi/aic7xxx_old.txt
Documentation/scsi/ibmmca.txt
Documentation/scsi/in2000.txt
Documentation/scsi/libsas.txt
Documentation/scsi/ncr53c8xx.txt
Documentation/scsi/scsi-changer.txt
Documentation/scsi/scsi_eh.txt
Documentation/scsi/st.txt
Documentation/scsi/sym53c8xx_2.txt
Documentation/sharedsubtree.txt
Documentation/sound/alsa/ALSA-Configuration.txt
Documentation/sound/alsa/Audigy-mixer.txt
Documentation/sound/alsa/SB-Live-mixer.txt
Documentation/stable_kernel_rules.txt
Documentation/sysctl/fs.txt
Documentation/sysctl/vm.txt
Documentation/uml/UserModeLinux-HOWTO.txt
Documentation/usb/hiddev.txt
Documentation/usb/rio.txt
Documentation/usb/usb-serial.txt
Documentation/watchdog/watchdog-api.txt
MAINTAINERS
arch/arm/mach-ixp4xx/Kconfig
arch/arm/mach-lh7a40x/Kconfig
arch/arm/mach-s3c2410/Kconfig
arch/arm/mm/Kconfig
arch/cris/arch-v10/Kconfig
arch/cris/arch-v10/drivers/Kconfig
arch/cris/arch-v10/drivers/eeprom.c
arch/cris/arch-v10/drivers/i2c.c
arch/cris/arch-v10/kernel/kgdb.c
arch/cris/arch-v32/drivers/Kconfig
arch/i386/kernel/cpuid.c
arch/i386/kernel/msr.c
arch/ia64/hp/common/sba_iommu.c
arch/m68knommu/Kconfig
arch/mips/Kconfig
arch/powerpc/Kconfig
arch/powerpc/platforms/83xx/Kconfig
arch/ppc/Kconfig
arch/sh/Kconfig
arch/sh64/lib/dbg.c
arch/sparc/Kconfig
arch/um/drivers/chan_user.c
block/as-iosched.c
block/blktrace.c
block/cfq-iosched.c
block/deadline-iosched.c
block/elevator.c
block/ll_rw_blk.c
block/noop-iosched.c
block/scsi_ioctl.c
drivers/acpi/glue.c
drivers/atm/iphase.c
drivers/base/bus.c
drivers/base/class.c
drivers/base/core.c
drivers/base/dd.c
drivers/base/firmware_class.c
drivers/base/platform.c
drivers/base/topology.c
drivers/cdrom/cdrom.c
drivers/char/Kconfig
drivers/char/hw_random/core.c
drivers/char/mem.c
drivers/char/misc.c
drivers/char/ppdev.c
drivers/char/raw.c
drivers/char/rio/riocmd.c
drivers/char/rio/rioinit.c
drivers/char/rio/rioparam.c
drivers/char/tpm/tpm.c
drivers/char/tty_io.c
drivers/char/vc_screen.c
drivers/char/vt.c
drivers/i2c/i2c-dev.c
drivers/ide/ide-floppy.c
drivers/input/serio/serio_raw.c
drivers/isdn/gigaset/common.c
drivers/isdn/gigaset/gigaset.h
drivers/isdn/gigaset/interface.c
drivers/isdn/gigaset/proc.c
drivers/isdn/hardware/eicon/os_4bri.c
drivers/isdn/hisax/hfc4s8s_l1.h
drivers/isdn/hisax/isdnl2.c
drivers/media/dvb/ttpci/budget-patch.c
drivers/media/video/Kconfig
drivers/media/video/pwc/pwc-if.c
drivers/message/fusion/mptbase.c
drivers/mmc/mmc_queue.c
drivers/mmc/mmc_sysfs.c
drivers/mmc/omap.c
drivers/mmc/wbsd.c
drivers/mtd/maps/Kconfig
drivers/mtd/maps/cfi_flagadm.c
drivers/net/Kconfig
drivers/net/e100.c
drivers/net/e1000/e1000_hw.c
drivers/net/phy/Kconfig
drivers/net/ppp_generic.c
drivers/net/sk98lin/h/skdrv2nd.h
drivers/net/sk98lin/skdim.c
drivers/net/wireless/ipw2200.c
drivers/parisc/ccio-dma.c
drivers/parisc/iosapic.c
drivers/pci/Kconfig
drivers/pci/hotplug/ibmphp_hpc.c
drivers/s390/net/claw.h
drivers/scsi/aic94xx/aic94xx_reg_def.h
drivers/scsi/aic94xx/aic94xx_sds.c
drivers/scsi/ncr53c8xx.c
drivers/scsi/ncr53c8xx.h
drivers/spi/Kconfig
drivers/usb/host/Kconfig
drivers/usb/host/u132-hcd.c
drivers/usb/misc/usb_u132.h
drivers/usb/serial/digi_acceleport.c
drivers/video/fbmem.c
drivers/video/fbsysfs.c
fs/Kconfig
fs/aio.c
fs/bio.c
fs/cifs/inode.c
fs/cifs/link.c
fs/jfs/jfs_filsys.h
fs/reiserfs/journal.c
fs/sysfs/dir.c
fs/sysfs/file.c
include/acpi/acpi_bus.h
include/asm-alpha/device.h [new file with mode: 0644]
include/asm-arm/device.h [new file with mode: 0644]
include/asm-arm26/device.h [new file with mode: 0644]
include/asm-avr32/device.h [new file with mode: 0644]
include/asm-cris/device.h [new file with mode: 0644]
include/asm-frv/device.h [new file with mode: 0644]
include/asm-generic/device.h [new file with mode: 0644]
include/asm-h8300/device.h [new file with mode: 0644]
include/asm-i386/device.h [new file with mode: 0644]
include/asm-ia64/device.h [new file with mode: 0644]
include/asm-m32r/device.h [new file with mode: 0644]
include/asm-m68k/device.h [new file with mode: 0644]
include/asm-m68knommu/device.h [new file with mode: 0644]
include/asm-m68knommu/mcfmbus.h
include/asm-mips/device.h [new file with mode: 0644]
include/asm-parisc/device.h [new file with mode: 0644]
include/asm-parisc/dma.h
include/asm-parisc/pci.h
include/asm-parisc/ropes.h
include/asm-powerpc/device.h [new file with mode: 0644]
include/asm-ppc/device.h [new file with mode: 0644]
include/asm-s390/device.h [new file with mode: 0644]
include/asm-sh/device.h [new file with mode: 0644]
include/asm-sh64/device.h [new file with mode: 0644]
include/asm-sparc/device.h [new file with mode: 0644]
include/asm-sparc64/device.h [new file with mode: 0644]
include/asm-um/device.h [new file with mode: 0644]
include/asm-v850/device.h [new file with mode: 0644]
include/asm-x86_64/device.h [new file with mode: 0644]
include/asm-xtensa/device.h [new file with mode: 0644]
include/linux/blkdev.h
include/linux/blktrace_api.h
include/linux/device.h
include/linux/elevator.h
include/linux/fb.h
include/linux/ixjuser.h
include/linux/jiffies.h
include/linux/kernel.h
include/linux/kobject.h
include/linux/miscdevice.h
include/linux/mmc/host.h
include/linux/module.h
include/linux/mqueue.h
include/linux/platform_device.h
include/linux/reiserfs_fs_sb.h
include/linux/sysfs.h
include/linux/textsearch.h
include/linux/tty.h
include/sound/core.h
init/Kconfig
kernel/module.c
lib/kobject.c
lib/kobject_uevent.c
lib/textsearch.c
net/wanrouter/af_wanpipe.c
net/wanrouter/wanmain.c
sound/Kconfig
sound/core/init.c
sound/core/pcm.c
sound/core/sound.c
sound/oss/cs46xx.c
sound/oss/soundcard.c
sound/sound_core.c

index abee7f58c1ed6b2c374aa0483c06f86a5a260512..73a8617f1861754198c18c5e7285da95358994fe 100644 (file)
@@ -201,7 +201,7 @@ udev
 ----
 udev is a userspace application for populating /dev dynamically with
 only entries for devices actually present.  udev replaces the basic
-functionality of devfs, while allowing persistant device naming for
+functionality of devfs, while allowing persistent device naming for
 devices.
 
 FUSE
index 2ffb0d62f0fe3ed8156586505b7faf1efe1c33ce..05431621c861d7b9f0228a228414beb3fb3ee52e 100644 (file)
@@ -489,7 +489,7 @@ size is the size of the area (must be multiples of PAGE_SIZE).
 flags can be or'd together and are
 
 DMA_MEMORY_MAP - request that the memory returned from
-dma_alloc_coherent() be directly writeable.
+dma_alloc_coherent() be directly writable.
 
 DMA_MEMORY_IO - request that the memory returned from
 dma_alloc_coherent() be addressable using read/write/memcpy_toio etc.
index 705f6be92bdbf934a1171f291ac8b3b631d670c3..e767805b4182826acc049e29a183ec5109c4a39e 100644 (file)
@@ -110,7 +110,7 @@ lock.
 
 Once the DMA transfer is finished (or timed out) you should disable
 the channel again. You should also check get_dma_residue() to make
-sure that all data has been transfered.
+sure that all data has been transferred.
 
 Example:
 
index 5c34910665d1d8514fb77c07e310f91b2b7f59bd..d389388c733e6c718f87de37a885132af6519930 100644 (file)
@@ -219,7 +219,7 @@ into the field vector of each element contained in a second argument.
 Note that the pre-assigned IOAPIC dev->irq is valid only if the device
 operates in PIN-IRQ assertion mode. In MSI-X mode, any attempt at
 using dev->irq by the device driver to request for interrupt service
-may result unpredictabe behavior.
+may result in unpredictable behavior.
 
 For each MSI-X vector granted, a device driver is responsible for calling
 other functions like request_irq(), enable_irq(), etc. to enable
index 92ebf29e9041cef2b68fc0c3c33698f8558ff085..ff06b738bb88065b28f6006c7a6381d5af7d57dd 100644 (file)
@@ -96,9 +96,9 @@ a) TASKSTATS_TYPE_AGGR_PID/TGID : attribute containing no payload but indicates
 a pid/tgid will be followed by some stats.
 
 b) TASKSTATS_TYPE_PID/TGID: attribute whose payload is the pid/tgid whose stats
-is being returned.
+are being returned.
 
-c) TASKSTATS_TYPE_STATS: attribute with a struct taskstsats as payload. The
+c) TASKSTATS_TYPE_STATS: attribute with a struct taskstats as payload. The
 same structure is used for both per-pid and per-tgid stats.
 
 3. New message sent by kernel whenever a task exits. The payload consists of a
@@ -122,12 +122,12 @@ of atomicity).
 
 However, maintaining per-process, in addition to per-task stats, within the
 kernel has space and time overheads. To address this, the taskstats code
-accumalates each exiting task's statistics into a process-wide data structure.
-When the last task of a process exits, the process level data accumalated also
+accumulates each exiting task's statistics into a process-wide data structure.
+When the last task of a process exits, the process level data accumulated also
 gets sent to userspace (along with the per-task data).
 
 When a user queries to get per-tgid data, the sum of all other live threads in
-the group is added up and added to the accumalated total for previously exited
+the group is added up and added to the accumulated total for previously exited
 threads of the same thread group.
 
 Extending taskstats
index 34bf8f60d8f827a9b83f27747c265a27fe38928d..c6c9a9c10d7f88b5f894990e45878acadbb2ea64 100644 (file)
@@ -183,7 +183,7 @@ it, the pci dma mapping routines and associated data structures have now been
 modified to accomplish a direct page -> bus translation, without requiring
 a virtual address mapping (unlike the earlier scheme of virtual address
 -> bus translation). So this works uniformly for high-memory pages (which
-do not have a correponding kernel virtual address space mapping) and
+do not have a corresponding kernel virtual address space mapping) and
 low-memory pages.
 
 Note: Please refer to DMA-mapping.txt for a discussion on PCI high mem DMA
@@ -391,7 +391,7 @@ forced such requests to be broken up into small chunks before being passed
 on to the generic block layer, only to be merged by the i/o scheduler
 when the underlying device was capable of handling the i/o in one shot.
 Also, using the buffer head as an i/o structure for i/os that didn't originate
-from the buffer cache unecessarily added to the weight of the descriptors
+from the buffer cache unnecessarily added to the weight of the descriptors
 which were generated for each such chunk.
 
 The following were some of the goals and expectations considered in the
@@ -403,14 +403,14 @@ i.  Should be appropriate as a descriptor for both raw and buffered i/o  -
     for raw i/o.
 ii. Ability to represent high-memory buffers (which do not have a virtual
     address mapping in kernel address space).
-iii.Ability to represent large i/os w/o unecessarily breaking them up (i.e
+iii.Ability to represent large i/os w/o unnecessarily breaking them up (i.e
     greater than PAGE_SIZE chunks in one shot)
 iv. At the same time, ability to retain independent identity of i/os from
     different sources or i/o units requiring individual completion (e.g. for
     latency reasons)
 v.  Ability to represent an i/o involving multiple physical memory segments
     (including non-page aligned page fragments, as specified via readv/writev)
-    without unecessarily breaking it up, if the underlying device is capable of
+    without unnecessarily breaking it up, if the underlying device is capable of
     handling it.
 vi. Preferably should be based on a memory descriptor structure that can be
     passed around different types of subsystems or layers, maybe even
@@ -1013,7 +1013,7 @@ Characteristics:
 i. Binary tree
 AS and deadline i/o schedulers use red black binary trees for disk position
 sorting and searching, and a fifo linked list for time-based searching. This
-gives good scalability and good availablility of information. Requests are
+gives good scalability and good availability of information. Requests are
 almost always dispatched in disk sort order, so a cache is kept of the next
 request in sort order to prevent binary tree lookups.
 
index 9188337d8f6b8f2b3ee852463c72494164dfb398..babce13150265f173fc32dfa72ce1b91cf234afd 100644 (file)
@@ -1,7 +1,7 @@
 
-The cpufreq-nforce2 driver changes the FSB on nVidia nForce2 plattforms.
+The cpufreq-nforce2 driver changes the FSB on nVidia nForce2 platforms.
 
-This works better than on other plattforms, because the FSB of the CPU
+This works better than on other platforms, because the FSB of the CPU
 can be controlled independently from the PCI/AGP clock.
 
 The module has two options:
index 4868c34f75090fe75b4f6bb28f70c7638540c4cd..cc60d29b954cd394ccd1eba1c27b06bfc049302d 100644 (file)
@@ -54,8 +54,8 @@ additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets
 
 ia64 and x86_64 use the number of disabled local apics in ACPI tables MADT
 to determine the number of potentially hot-pluggable cpus. The implementation
-should only rely on this to count the #of cpus, but *MUST* not rely on the
-apicid values in those tables for disabled apics. In the event BIOS doesnt
+should only rely on this to count the # of cpus, but *MUST* not rely on the
+apicid values in those tables for disabled apics. In the event BIOS doesn't
 mark such hot-pluggable cpus as disabled entries, one could use this
 parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map.
 
index 28c4f79662c2a84b05361d02f429b075e346380d..70690f1a14af53cd128ab0a553421044e28cd319 100644 (file)
@@ -92,7 +92,7 @@ Your cooperation is appreciated.
                  7 = /dev/full         Returns ENOSPC on write
                  8 = /dev/random       Nondeterministic random number gen.
                  9 = /dev/urandom      Faster, less secure random number gen.
-                10 = /dev/aio          Asyncronous I/O notification interface
+                10 = /dev/aio          Asynchronous I/O notification interface
                 11 = /dev/kmsg         Writes to this come out as printk's
   1 block      RAM disk
                  0 = /dev/ram0         First RAM disk
@@ -1093,7 +1093,7 @@ Your cooperation is appreciated.
 
  55 char       DSP56001 digital signal processor
                  0 = /dev/dsp56k       First DSP56001
- 55 block      Mylex DAC960 PCI RAID controller; eigth controller
+ 55 block      Mylex DAC960 PCI RAID controller; eighth controller
                  0 = /dev/rd/c7d0      First disk, whole disk
                  8 = /dev/rd/c7d1      Second disk, whole disk
                    ...
@@ -1456,7 +1456,7 @@ Your cooperation is appreciated.
                  1 = /dev/cum1         Callout device for ttyM1
                    ...
 
- 79 block      Compaq Intelligent Drive Array, eigth controller
+ 79 block      Compaq Intelligent Drive Array, eighth controller
                  0 = /dev/ida/c7d0     First logical drive whole disk
                 16 = /dev/ida/c7d1     Second logical drive whole disk
                    ...
@@ -1900,7 +1900,7 @@ Your cooperation is appreciated.
                  1 = /dev/av1          Second A/V card
                    ...
 
-111 block      Compaq Next Generation Drive Array, eigth controller
+111 block      Compaq Next Generation Drive Array, eighth controller
                  0 = /dev/cciss/c7d0   First logical drive, whole disk
                 16 = /dev/cciss/c7d1   Second logical drive, whole disk
                    ...
index 5eee3e0bfc4caf0493e3cc7492ef335dcb2dba1f..9f0bc3bfd776b4b3f50523604a320ffe5d8eba8e 100644 (file)
 Platform Devices and Drivers
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+See <linux/platform_device.h> for the driver model interface to the
+platform bus:  platform_device, and platform_driver.  This pseudo-bus
+is used to connect devices on busses with minimal infrastructure,
+like those used to integrate peripherals on many system-on-chip
+processors, or some "legacy" PC interconnects; as opposed to large
+formally specified ones like PCI or USB.
+
 
 Platform devices
 ~~~~~~~~~~~~~~~~
 Platform devices are devices that typically appear as autonomous
 entities in the system. This includes legacy port-based devices and
-host bridges to peripheral buses. 
-
-
-Platform drivers
-~~~~~~~~~~~~~~~~
-Drivers for platform devices are typically very simple and
-unstructured. Either the device was present at a particular I/O port
-and the driver was loaded, or it was not. There was no possibility
-of hotplugging or alternative discovery besides probing at a specific
-I/O address and expecting a specific response.
+host bridges to peripheral buses, and most controllers integrated
+into system-on-chip platforms.  What they usually have in common
+is direct addressing from a CPU bus.  Rarely, a platform_device will
+be connected through a segment of some other kind of bus; but its
+registers will still be directly addressible.
 
+Platform devices are given a name, used in driver binding, and a
+list of resources such as addresses and IRQs.
 
-Other Architectures, Modern Firmware, and new Platforms
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-These devices are not always at the legacy I/O ports. This is true on
-other architectures and on some modern architectures. In most cases,
-the drivers are modified to discover the devices at other well-known
-ports for the given platform. However, the firmware in these systems
-does usually know where exactly these devices reside, and in some
-cases, it's the only way of discovering them. 
+struct platform_device {
+       const char      *name;
+       u32             id;
+       struct device   dev;
+       u32             num_resources;
+       struct resource *resource;
+};
 
 
-The Platform Bus
-~~~~~~~~~~~~~~~~
-A platform bus has been created to deal with these issues. First and
-foremost, it groups all the legacy devices under a common bus, and
-gives them a common parent if they don't already have one. 
-
-But, besides the organizational benefits, the platform bus can also
-accommodate firmware-based enumeration. 
-
-
-Device Discovery
+Platform drivers
 ~~~~~~~~~~~~~~~~
-The platform bus has no concept of probing for devices. Devices
-discovery is left up to either the legacy drivers or the
-firmware. These entities are expected to notify the platform of
-devices that it discovers via the bus's add() callback:
-
-       platform_bus.add(parent,bus_id).
-
-
-Bus IDs
-~~~~~~~
-Bus IDs are the canonical names for the devices. There is no globally
-standard addressing mechanism for legacy devices. In the IA-32 world,
-we have Pnp IDs to use, as well as the legacy I/O ports. However,
-neither tell what the device really is or have any meaning on other
-platforms. 
-
-Since both PnP IDs and the legacy I/O ports (and other standard I/O
-ports for specific devices) have a 1:1 mapping, we map the
-platform-specific name or identifier to a generic name (at least
-within the scope of the kernel).
-
-For example, a serial driver might find a device at I/O 0x3f8. The
-ACPI firmware might also discover a device with PnP ID (_HID)
-PNP0501. Both correspond to the same device and should be mapped to the
-canonical name 'serial'. 
-
-The bus_id field should be a concatenation of the canonical name and
-the instance of that type of device. For example, the device at I/O
-port 0x3f8 should have a bus_id of "serial0". This places the
-responsibility of enumerating devices of a particular type up to the
-discovery mechanism. But, they are the entity that should know best
-(as opposed to the platform bus driver).
-
-
-Drivers 
-~~~~~~~
-Drivers for platform devices should have a name that is the same as
-the canonical name of the devices they support. This allows the
-platform bus driver to do simple matching with the basic data
-structures to determine if a driver supports a certain device. 
-
-For example, a legacy serial driver should have a name of 'serial' and
-register itself with the platform bus. 
-
-
-Driver Binding
-~~~~~~~~~~~~~~
-Legacy drivers assume they are bound to the device once they start up
-and probe an I/O port. Divorcing them from this will be a difficult
-process. However, that shouldn't prevent us from implementing
-firmware-based enumeration. 
-
-The firmware should notify the platform bus about devices before the
-legacy drivers have had a chance to load. Once the drivers are loaded,
-they driver model core will attempt to bind the driver to any
-previously-discovered devices. Once that has happened, it will be free
-to discover any other devices it pleases.
+Platform drivers follow the standard driver model convention, where
+discovery/enumeration is handled outside the drivers, and drivers
+provide probe() and remove() methods.  They support power management
+and shutdown notifications using the standard conventions.
+
+struct platform_driver {
+       int (*probe)(struct platform_device *);
+       int (*remove)(struct platform_device *);
+       void (*shutdown)(struct platform_device *);
+       int (*suspend)(struct platform_device *, pm_message_t state);
+       int (*suspend_late)(struct platform_device *, pm_message_t state);
+       int (*resume_early)(struct platform_device *);
+       int (*resume)(struct platform_device *);
+       struct device_driver driver;
+};
+
+Note that probe() should general verify that the specified device hardware
+actually exists; sometimes platform setup code can't be sure.  The probing
+can use device resources, including clocks, and device platform_data.
+
+Platform drivers register themselves the normal way:
+
+       int platform_driver_register(struct platform_driver *drv);
+
+Or, in common situations where the device is known not to be hot-pluggable,
+the probe() routine can live in an init section to reduce the driver's
+runtime memory footprint:
+
+       int platform_driver_probe(struct platform_driver *drv,
+                         int (*probe)(struct platform_device *))
+
+
+Device Enumeration
+~~~~~~~~~~~~~~~~~~
+As a rule, platform specific (and often board-specific) setup code wil
+register platform devices:
+
+       int platform_device_register(struct platform_device *pdev);
+
+       int platform_add_devices(struct platform_device **pdevs, int ndev);
+
+The general rule is to register only those devices that actually exist,
+but in some cases extra devices might be registered.  For example, a kernel
+might be configured to work with an external network adapter that might not
+be populated on all boards, or likewise to work with an integrated controller
+that some boards might not hook up to any peripherals.
+
+In some cases, boot firmware will export tables describing the devices
+that are populated on a given board.   Without such tables, often the
+only way for system setup code to set up the correct devices is to build
+a kernel for a specific target board.  Such board-specific kernels are
+common with embedded and custom systems development.
+
+In many cases, the memory and IRQ resources associated with the platform
+device are not enough to let the device's driver work.  Board setup code
+will often provide additional information using the device's platform_data
+field to hold additional information.
+
+Embedded systems frequently need one or more clocks for platform devices,
+which are normally kept off until they're actively needed (to save power).
+System setup also associates those clocks with the device, so that that
+calls to clk_get(&pdev->dev, clock_name) return them as needed.
+
+
+Device Naming and Driver Binding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The platform_device.dev.bus_id is the canonical name for the devices.
+It's built from two components:
+
+    * platform_device.name ... which is also used to for driver matching.
+
+    * platform_device.id ... the device instance number, or else "-1"
+      to indicate there's only one.
+
+These are catenated, so name/id "serial"/0 indicates bus_id "serial.0", and
+"serial/3" indicates bus_id "serial.3"; both would use the platform_driver
+named "serial".  While "my_rtc"/-1 would be bus_id "my_rtc" (no instance id)
+and use the platform_driver called "my_rtc".
+
+Driver binding is performed automatically by the driver core, invoking
+driver probe() after finding a match between device and driver.  If the
+probe() succeeds, the driver and device are bound as usual.  There are
+three different ways to find such a match:
+
+    - Whenever a device is registered, the drivers for that bus are
+      checked for matches.  Platform devices should be registered very
+      early during system boot.
+
+    - When a driver is registered using platform_driver_register(), all
+      unbound devices on that bus are checked for matches.  Drivers
+      usually register later during booting, or by module loading.
+
+    - Registering a driver using platform_driver_probe() works just like
+      using platform_driver_register(), except that the the driver won't
+      be probed later if another device registers.  (Which is OK, since
+      this interface is only for use with non-hotpluggable devices.)
 
index 98b233cb8b36882a41c3e604315b179ab0ca3537..92d86f7271b4d960431e3333ce5d0de3b9f9889e 100644 (file)
@@ -92,7 +92,7 @@ struct device represents a single device. It mainly contains metadata
 describing the relationship the device has to other entities. 
 
 
-- Embedd a struct device in the bus-specific device type. 
+- Embed a struct device in the bus-specific device type. 
 
 
 struct pci_dev {
index 531239b2908210dd78a26809e23b570a8be1ad53..2ecd834585e64140fcaa064c27142a9b7fd23950 100644 (file)
@@ -71,7 +71,7 @@ eliminating the need for any additional ioctls.
 The disadvantage is that the driver/hardware has to manage the rest. For
 the application programmer it would be as simple as sending/receiving an
 array to/from the CI ioctls as defined in the Linux DVB API. No changes
-have been made in the API to accomodate this feature.
+have been made in the API to accommodate this feature.
 
 
 * Why the need for another CI interface ?
@@ -102,7 +102,7 @@ This CI interface follows the CI high level interface, which is not
 implemented by most applications. Hence this area is revisited.
 
 This CI interface is quite different in the case that it tries to
-accomodate all other CI based devices, that fall into the other categories
+accommodate all other CI based devices, that fall into the other categories.
 
 This means that this CI interface handles the EN50221 style tags in the
 Application layer only and no session management is taken care of by the
index 6a099edadd622f625e2606c9402916a227accf4e..60e361ba08c05ce491fd34a2eb73bc3194ca8c75 100644 (file)
@@ -62,7 +62,7 @@ res           : root device I/O resource
 bus_base_addr : slot 0 address on this bus
 slots        : max slot number to probe
 force_probe   : Probe even when slot 0 is empty (no EISA mainboard)
-dma_mask      : Default DMA mask. Usualy the bridge device dma_mask.
+dma_mask      : Default DMA mask. Usually the bridge device dma_mask.
 bus_nr       : unique bus id, set by eisa_root_register
 
 ** Driver :
index 060abb0c700485e1b23495be56714d64d6589b16..9e8811f92b84160451947366508957d26b750597 100644 (file)
@@ -3,7 +3,7 @@ Mount options for ADFS
 
   uid=nnn      All files in the partition will be owned by
                user id nnn.  Default 0 (root).
-  gid=nnn      All files in the partition willbe in group
+  gid=nnn      All files in the partition will be in group
                nnn.  Default 0 (root).
   ownmask=nnn  The permission mask for ADFS 'owner' permissions
                will be nnn.  Default 0700.
index c3a7afb5eabf337a8dc272220070c7e96bbc7d8f..b34cdb50eab466ca539a559228c5cfc6a18e6bde 100644 (file)
@@ -209,7 +209,7 @@ will happen for write(2).
 
 [struct config_group]
 
-A config_item cannot live in a vaccum.  The only way one can be created
+A config_item cannot live in a vacuum.  The only way one can be created
 is via mkdir(2) on a config_group.  This will trigger creation of a
 child item.
 
@@ -275,7 +275,7 @@ directory is not empty.
 
 [struct configfs_subsystem]
 
-A subsystem must register itself, ususally at module_init time.  This
+A subsystem must register itself, usually at module_init time.  This
 tells configfs to make the subsystem appear in the file tree.
 
        struct configfs_subsystem {
index a584f05403a412e778cf359e84d3690d5a22d1e4..3d74477389587b4be4d03950845c17a1e396a707 100644 (file)
@@ -111,7 +111,7 @@ For each connection the following files exist within this directory:
 
  'waiting'
 
-  The number of requests which are waiting to be transfered to
+  The number of requests which are waiting to be transferred to
   userspace or being processed by the filesystem daemon.  If there is
   no filesystem activity and 'waiting' is non-zero, then the
   filesystem is hung or deadlocked.
@@ -136,7 +136,7 @@ following will happen:
 
   2) If the request is not yet sent to userspace AND the signal is not
      fatal, then an 'interrupted' flag is set for the request.  When
-     the request has been successfully transfered to userspace and
+     the request has been successfully transferred to userspace and
      this flag is set, an INTERRUPT request is queued.
 
   3) If the request is already sent to userspace, then an INTERRUPT
index 33dc360c8e8916333e435aa6b1f98e3f0d20eb58..38aba03efc5e1451e91f63d3c9ea0afa3022d90f 100644 (file)
@@ -274,7 +274,7 @@ History
      Fixed race-condition in buffer code - it is in all filesystems in Linux;
         when reading device (cat /dev/hda) while creating files on it, files
         could be damaged
-2.02 Woraround for bug in breada in Linux. breada could cause accesses beyond
+2.02 Workaround for bug in breada in Linux. breada could cause accesses beyond
         end of partition
 2.03 Char, block devices and pipes are correctly created
      Fixed non-crashing race in unlink (Alexander Viro)
index 35f105b29e3e26bb4201049f663062989b4693b8..13ba649bda75dae1010891a62da6399ca25d7113 100644 (file)
@@ -337,7 +337,7 @@ Finally, for a mirrored volume, i.e. raid level 1, the table would look like
 this (note all values are in 512-byte sectors):
 
 --- cut here ---
-# Ofs Size   Raid   Log  Number Region Should Number Source  Start Taget  Start
+# Ofs Size   Raid   Log  Number Region Should Number Source  Start Target Start
 # in  of the type   type of log size   sync?  of     Device  in    Device in
 # vol volume            params              mirrors         Device       Device
 0    2056320 mirror core 2     16     nosync 2    /dev/hda1 0   /dev/hdb1 0
@@ -599,7 +599,7 @@ Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
        - Major bug fixes for reading files and volumes in corner cases which
          were being hit by Windows 2k/XP users.
 2.1.2:
-       - Major bug fixes aleviating the hangs in statfs experienced by some
+       - Major bug fixes alleviating the hangs in statfs experienced by some
          users.
 2.1.1:
        - Update handling of compressed files so people no longer get the
index 4389c684a80a66d402f464a4ecf3ed7a15bda1bb..af6defd10cb604fa4f0468ba6522ca30e57adda5 100644 (file)
@@ -30,7 +30,7 @@ Caveats
 Features which OCFS2 does not support yet:
        - sparse files
        - extended attributes
-       - shared writeable mmap
+       - shared writable mmap
        - loopback is supported, but data written will not
          be cluster coherent.
        - quotas
index 3355e6920105014bda194eb3a1c5360f37a33916..72af5de1effb44a93d907ed4e0117ec403a8257e 100644 (file)
@@ -1220,9 +1220,9 @@ applications are using mlock(), or if you are running with no swap then
 you probably should increase the lower_zone_protection setting.
 
 The units of this tunable are fairly vague.  It is approximately equal
-to "megabytes".  So setting lower_zone_protection=100 will protect around 100
+to "megabytes," so setting lower_zone_protection=100 will protect around 100
 megabytes of the lowmem zone from user allocations.  It will also make
-those 100 megabytes unavaliable for use by applications and by
+those 100 megabytes unavailable for use by applications and by
 pagecache, so there is a cost.
 
 The effects of this tunable may be observed by monitoring
@@ -1538,10 +1538,10 @@ TCP settings
 tcp_ecn
 -------
 
-This file controls the use of the ECN bit in the IPv4 headers, this is a new
+This file controls the use of the ECN bit in the IPv4 headers. This is a new
 feature about Explicit Congestion Notification, but some routers and firewalls
-block trafic that has this bit set, so it could be necessary to echo 0 to
-/proc/sys/net/ipv4/tcp_ecn, if you want to talk to this sites. For more info
+block traffic that has this bit set, so it could be necessary to echo 0 to
+/proc/sys/net/ipv4/tcp_ecn if you want to talk to these sites. For more info
 you could read RFC2481.
 
 tcp_retrans_collapse
index 982645a1981de148771c844c41e7affa6373b3aa..1343d118a9b2d63815355cb28f18605c565653f6 100644 (file)
@@ -210,7 +210,7 @@ FILES
    /signal2
        The two signal notification channels of an SPU.  These  are  read-write
        files  that  operate  on  a 32 bit word.  Writing to one of these files
-       triggers an interrupt on the SPU. The  value  writting  to  the  signal
+       triggers an interrupt on the SPU.  The  value  written  to  the  signal
        files can be read from the SPU through a channel read or from host user
        space through the file.  After the value has been read by the  SPU,  it
        is  reset  to zero.  The possible operations on an open signal1 or sig-
index 6ce5aa9abbc5918cb961c47f55f0ebd5bbb64947..9304fb36ae8a91671693bde1fd2644b3085f42f2 100644 (file)
@@ -59,7 +59,7 @@ the following things on the "Kernel Hacking" tab:
 Then build as usual, download to the board and execute. Note that if
 "Immediate activation" was selected, then the kernel will wait for GDB to
 attach. If not, then the kernel will boot immediately and GDB will have to
-interupt it or wait for an exception to occur if before doing anything with
+interrupt it or wait for an exception to occur before doing anything with
 the kernel.
 
 
index 8b0a5fc8bfd96cc64fe09f165b740f272196f654..aaa1cec86f0bb869c674ea2faf7a5506770b40ad 100644 (file)
@@ -156,7 +156,7 @@ with the main kernel in this regard. Hence the debug mode code (gdbstub) is
 almost completely self-contained. The only external code used is the
 sprintf family of functions.
 
-Futhermore, break.S is so complicated because single-step mode does not
+Furthermore, break.S is so complicated because single-step mode does not
 switch off on entry to an exception. That means unless manually disabled,
 single-stepping will blithely go on stepping into things like interrupts.
 See gdbstub.txt for more information.
index 0bf38baa2db96a162e8f641eac90de097487cbf4..786c3a766995f09ad8ad443c042be0af0a6484f3 100644 (file)
@@ -390,5 +390,5 @@ mlord@pobox.com
 Wed Apr 17 22:52:44 CEST 2002 edited by Marcin Dalecki, the current
 maintainer.
 
-Wed Aug 20 22:31:29 CEST 2003 updated ide boot uptions to current ide.c
+Wed Aug 20 22:31:29 CEST 2003 updated ide boot options to current ide.c
 comments at 2.6.0-test4 time. Maciej Soltysiak <solt@dns.toxicfilms.tv>
index 4f0e89df5c5191cbc166adc5f86e23f69aac6ba2..7dc4f175943cff2854dd1d54ff93c03be98b2b56 100644 (file)
@@ -91,8 +91,8 @@ JOY1DAT   Y7  Y6  Y5  Y4  Y3  Y2  Y1  Y0     X7  X6  X5  X4  X3  X2  X1  X0
          |   1    | M0HQ     | JOY0DAT Horizontal Clock (quadrature)   |
          |   2    | M0V      | JOY0DAT Vertical Clock                  |
          |   3    | M0VQ     | JOY0DAT Vertical Clock  (quadrature)    |
-         |   4    | M1V      | JOY1DAT Horizontall Clock               |
-         |   5    | M1VQ     | JOY1DAT Horizontall Clock (quadrature)  |
+         |   4    | M1V      | JOY1DAT Horizontal Clock                |
+         |   5    | M1VQ     | JOY1DAT Horizontal Clock (quadrature)   |
          |   6    | M1V      | JOY1DAT Vertical Clock                  |
          |   7    | M1VQ     | JOY1DAT Vertical Clock (quadrature)     |
          +--------+----------+-----------------------------------------+
index 1e7e5853ba4c71eafdbc1e9f57cc749826b658c4..668f4d0d97d60efe0f8fd99538e4b259b19874ff 100644 (file)
@@ -103,7 +103,7 @@ LEFT=0x74 & RIGHT=0x75).
 
 5.1 Joystick Event Reporting
 
-In this mode, the ikbd generates a record whever the joystick position is
+In this mode, the ikbd generates a record whenever the joystick position is
 changed (i.e. for each opening or closing of a joystick switch or trigger).
 
 The joystick event record is two bytes of the form:
@@ -277,8 +277,8 @@ default to 1 at RESET (or power-up).
 9.7 SET MOUSE SCALE
 
     0x0C
-    X                   ; horizontal mouse ticks per internel X
-    Y                   ; vertical mouse ticks per internel Y
+    X                   ; horizontal mouse ticks per internal X
+    Y                   ; vertical mouse ticks per internal Y
 
 This command sets the scale factor for the ABSOLUTE MOUSE POSITIONING mode.
 In this mode, the specified number of mouse phase changes ('clicks') must
@@ -323,7 +323,7 @@ mouse position.
     0x0F
 
 This command makes the origin of the Y axis to be at the bottom of the
-logical coordinate system internel to the ikbd for all relative or absolute
+logical coordinate system internal to the ikbd for all relative or absolute
 mouse motion. This causes mouse motion toward the user to be negative in sign
 and away from the user to be positive.
 
@@ -597,8 +597,8 @@ mode or FIRE BUTTON MONITORING mode.
 
 10. SCAN CODES
 
-The key scan codes return by the ikbd are chosen to simplify the
-implementaion of GSX.
+The key scan codes returned by the ikbd are chosen to simplify the
+implementation of GSX.
 
 GSX Standard Keyboard Mapping.
 
index 0a8c97e87d47ee6fce48dbe96ff93e6c42d6fa5d..5360e434486ced9970c6c71454b085b3ff617061 100644 (file)
@@ -134,7 +134,7 @@ Reading /sys/../lineX will return the format string with its current value:
   888888888888
   Linux Rocks!
 
-Writing to /sys/../lineX will set the coresponding LCD line.
+Writing to /sys/../lineX will set the corresponding LCD line.
  - Excess characters are ignored.
  - If less characters are written than allowed, the remaining digits are
    unchanged.
index 8ec32cc49eb107bdab130a6cb24c54b6da9dfcb2..62d4af44ec4a2e0a4987d48687dc0bd1d01dcbf0 100644 (file)
@@ -735,7 +735,7 @@ CDROM_DISC_STATUS           Get disc type, etc.
            Ok, this is where problems start.  The current interface for
            the CDROM_DISC_STATUS ioctl is flawed.  It makes the false
            assumption that CDs are all CDS_DATA_1 or all CDS_AUDIO, etc.
-           Unfortunatly, while this is often the case, it is also
+           Unfortunately, while this is often the case, it is also
            very common for CDs to have some tracks with data, and some
            tracks with audio.  Just because I feel like it, I declare
            the following to be the best way to cope.  If the CD has
index 50f4eddf899cac4a06724355a2fd26299ab6909d..4b3d6710c504c6257b7abd7d03129f9320e7c2c5 100644 (file)
@@ -227,9 +227,9 @@ more details, with real examples.
        be included in a library, lib.a.
        All objects listed with lib-y are combined in a single
        library for that directory.
-       Objects that are listed in obj-y and additionaly listed in
-       lib-y will not be included in the library, since they will anyway
-       be accessible.
+       Objects that are listed in obj-y and additionally listed in
+       lib-y will not be included in the library, since they will
+       be accessible anyway.
        For consistency, objects listed in lib-m will be included in lib.a.
 
        Note that the same kbuild makefile may list files to be built-in
@@ -535,7 +535,7 @@ Both possibilities are described in the following.
        Host programs can be made up based on composite objects.
        The syntax used to define composite objects for host programs is
        similar to the syntax used for kernel objects.
-       $(<executeable>-objs) lists all objects used to link the final
+       $(<executable>-objs) lists all objects used to link the final
        executable.
 
        Example:
@@ -1022,7 +1022,7 @@ When kbuild executes, the following steps are followed (roughly):
        In this example, there are two possible targets, requiring different
        options to the linker. The linker options are specified using the
        LDFLAGS_$@ syntax - one for each potential target.
-       $(targets) are assinged all potential targets, by which kbuild knows
+       $(targets) are assigned all potential targets, by which kbuild knows
        the targets and will:
                1) check for commandline changes
                2) delete target during make clean
index 3da586bc7859a3f982255547472fcfd5193eaf6a..60c665d9cfaa883416c79efb0fb99245f610a1e2 100644 (file)
@@ -304,7 +304,7 @@ about the status of the key service:
        R       Revoked
        D       Dead
        Q       Contributes to user's quota
-       U       Under contruction by callback to userspace
+       U       Under construction by callback to userspace
        N       Negative key
 
      This file must be enabled at kernel configuration time as it allows anyone
index c487186eb2b93ac9a0180561396470bce867e4b3..6f639e3473af550bbf384a506fcb9074a60dca2b 100644 (file)
@@ -121,7 +121,7 @@ contains the following options:
 MAX_AGE:
 
 Maximum time, in seconds, of hard drive spindown time that you are
-confortable with. Worst case, it's possible that you could lose this
+comfortable with. Worst case, it's possible that you could lose this
 amount of work if your battery fails while you're in laptop mode.
 
 MINIMUM_BATTERY_MINUTES:
@@ -235,7 +235,7 @@ It should be installed as /etc/default/laptop-mode on Debian, and as
 
 --------------------CONFIG FILE BEGIN-------------------------------------------
 # Maximum time, in seconds, of hard drive spindown time that you are
-# confortable with. Worst case, it's possible that you could lose this
+# comfortable with. Worst case, it's possible that you could lose this
 # amount of work if your battery fails you while in laptop mode.
 #MAX_AGE=600
 
@@ -350,7 +350,7 @@ fi
 # set defaults instead:
 
 # Maximum time, in seconds, of hard drive spindown time that you are
-# confortable with. Worst case, it's possible that you could lose this
+# comfortable with. Worst case, it's possible that you could lose this
 # amount of work if your battery fails you while in laptop mode.
 MAX_AGE=${MAX_AGE:-'600'}
 
@@ -699,7 +699,7 @@ ACPI integration
 Dax Kelson submitted this so that the ACPI acpid daemon will
 kick off the laptop_mode script and run hdparm. The part that
 automatically disables laptop mode when the battery is low was
-writen by Jan Topinski.
+written by Jan Topinski.
 
 -----------------/etc/acpi/events/ac_adapter BEGIN------------------------------
 event=ac_adapter
index 7751704b6db1418e6eb3ecb7a273b34730f66fac..58408dd023c77e0e0712d02811fc0238c5ee1742 100644 (file)
@@ -212,7 +212,7 @@ There are some minimal guarantees that may be expected of a CPU:
 
        STORE *X = c, d = LOAD *X
 
-     (Loads and stores overlap if they are targetted at overlapping pieces of
+     (Loads and stores overlap if they are targeted at overlapping pieces of
      memory).
 
 And there are a number of things that _must_ or _must_not_ be assumed:
index 93af3e87c65b470828d1fd62193c2ac5590a3e75..fb8dc6422a5212488f362e1a48711afe452f0482 100644 (file)
@@ -95,8 +95,8 @@ There are two types of event register ACK mechanisms.
                Move all to dev->poll()
 
 C) Ability to detect new work correctly.
-NAPI works by shutting down event interrupts when theres work and
-turning them on when theres none. 
+NAPI works by shutting down event interrupts when there's work and
+turning them on when there's none. 
 New packets might show up in the small window while interrupts were being 
 re-enabled (refer to appendix 2).  A packet might sneak in during the period 
 we are enabling interrupts. We only get to know about such a packet when the 
@@ -114,7 +114,7 @@ Locking rules and environmental guarantees
 only one CPU can pick the initial interrupt and hence the initial
 netif_rx_schedule(dev);
 - The core layer invokes devices to send packets in a round robin format.
-This implies receive is totaly lockless because of the guarantee only that 
+This implies receive is totally lockless because of the guarantee that only 
 one CPU is executing it.
 -  contention can only be the result of some other CPU accessing the rx
 ring. This happens only in close() and suspend() (when these methods
@@ -510,7 +510,7 @@ static int my_poll (struct net_device *dev, int *budget)
                        an interrupt will be generated */
                         goto done;
        }
-       /* done! at least thats what it looks like ;->
+       /* done! at least that's what it looks like ;->
        if new packets came in after our last check on status bits
        they'll be caught by the while check and we go back and clear them 
        since we havent exceeded our quota */
@@ -535,11 +535,11 @@ done:
         * 1. it can race with disabling irqs in irq handler (which are done to 
        * schedule polls)
         * 2. it can race with dis/enabling irqs in other poll threads
-        * 3. if an irq raised after the begining of the outer  beginning 
-        * loop(marked in the code above), it will be immediately
+        * 3. if an irq raised after the beginning of the outer beginning 
+        * loop (marked in the code above), it will be immediately
         * triggered here.
         *
-        * Summarizing: the logic may results in some redundant irqs both
+        * Summarizing: the logic may result in some redundant irqs both
         * due to races in masking and due to too late acking of already
         * processed irqs. The good news: no events are ever lost.
         */
@@ -601,7 +601,7 @@ a)
        
 5) dev->close() and dev->suspend() issues
 ==========================================
-The driver writter neednt worry about this. The top net layer takes
+The driver writer needn't worry about this; the top net layer takes
 care of it.
 
 6) Adding new Stats to /proc 
@@ -622,9 +622,9 @@ FC should be programmed to apply in the case when the system cant pull out
 packets fast enough i.e send a pause only when you run out of rx buffers.
 Note FC in itself is a good solution but we have found it to not be
 much of a commodity feature (both in NICs and switches) and hence falls
-under the same category as using NIC based mitigation. Also experiments
-indicate that its much harder to resolve the resource allocation
-issue (aka lazy receiving that NAPI offers) and hence quantify its usefullness
+under the same category as using NIC based mitigation. Also, experiments
+indicate that it's much harder to resolve the resource allocation
+issue (aka lazy receiving that NAPI offers) and hence quantify its usefulness
 proved harder. In any case, FC works even better with NAPI but is not
 necessary.
 
@@ -678,10 +678,10 @@ routine:
 CSR5 bit of interest is only the rx status. 
 If you look at the last if statement: 
 you just finished grabbing all the packets from the rx ring .. you check if
-status bit says theres more packets just in ... it says none; you then
+status bit says there are more packets just in ... it says none; you then
 enable rx interrupts again; if a new packet just came in during this check,
 we are counting that CSR5 will be set in that small window of opportunity
-and that by re-enabling interrupts, we would actually triger an interrupt
+and that by re-enabling interrupts, we would actually trigger an interrupt
 to register the new packet for processing.
 
 [The above description nay be very verbose, if you have better wording 
index 64896470e279b7d4675c46c4673e024026bd815c..6387d3decf858a7c83d2ae65f06c6eccdfa7dfae 100644 (file)
@@ -248,7 +248,7 @@ c) The driver's hardware probe routine is designed to avoid
    with device probing.  To avoid this behaviour, add one
    to the `io=' module parameter.  This doesn't actually change
    the I/O address, but it is a flag to tell the driver
-   topartially initialise the hardware before trying to
+   to partially initialise the hardware before trying to
    identify the card.  This could be dangerous if you are
    not sure that there is a cs89x0 card at the provided address.
 
@@ -620,8 +620,8 @@ I/O Address         Device                        IRQ      Device
                                                 12       Mouse (PS/2)                              
 Memory Address  Device                          13       Math Coprocessor
 --------------  ---------------------           14       Hard Disk controller
-A000-BFFF      EGA Graphics Adpater
-A000-C7FF      VGA Graphics Adpater
+A000-BFFF      EGA Graphics Adapter
+A000-C7FF      VGA Graphics Adapter
 B000-BFFF      Mono Graphics Adapter
 B800-BFFF      Color Graphics Adapter
 E000-FFFF      AT BIOS
index 493203a080a8baf1690bbd1ac8654e23c195f397..55eac4a784e2fdf598bb653de891baf685bfb5b1 100644 (file)
@@ -81,7 +81,7 @@ Installation
     1M. The RAM size decides the number of buffers and buffer size. The default 
     size and number of buffers are set as following: 
 
-          Totol    Rx RAM   Tx RAM   Rx Buf   Tx Buf   Rx buf   Tx buf
+          Total    Rx RAM   Tx RAM   Rx Buf   Tx Buf   Rx buf   Tx buf
          RAM size   size     size     size     size      cnt      cnt
          --------  ------   ------   ------   ------   ------   ------
            128K      64K      64K      10K      10K       6        6
index 12a008a5c22158999b94dbb0693de65469b3a59c..5a232d946be39fd425c1f9b6c5e821b902b2d465 100644 (file)
@@ -284,7 +284,7 @@ the necessary memory, so normally limits can be reached.
 -------------------
 
 If you check the source code you will see that what I draw here as a frame
-is not only the link level frame. At the begining of each frame there is a 
+is not only the link level frame. At the beginning of each frame there is a 
 header called struct tpacket_hdr used in PACKET_MMAP to hold link level's frame
 meta information like timestamp. So what we draw here a frame it's really 
 the following (from include/linux/if_packet.h):
index c8eee23be8c0a43d9c6f998691d44d0296626921..c6cf4a3c16e029258e3c6790ee3b5da441259eff 100644 (file)
@@ -63,8 +63,8 @@ Current:
 Result: OK: 13101142(c12220741+d880401) usec, 10000000 (60byte,0frags)
   763292pps 390Mb/sec (390805504bps) errors: 39664
 
-Confguring threads and devices
-==============================
+Configuring threads and devices
+================================
 This is done via the /proc interface easiest done via pgset in the scripts
 
 Examples:
@@ -116,7 +116,7 @@ Examples:
                                         there must be no spaces between the
                                         arguments. Leading zeros are required.
                                         Do not set the bottom of stack bit,
-                                        thats done automatically. If you do
+                                        that's done automatically. If you do
                                         set the bottom of stack bit, that
                                         indicates that you want to randomly
                                         generate that address and the flag
index 59cb915c371312ef815793e6f8eb13a15e8c6707..5e21f7cb638332f3eac08536c580dbc26b94298f 100644 (file)
@@ -25,7 +25,7 @@ up into 3 parts because of the length of the line):
 
    1000        0 54165785 4 cd1e6040 25 4 27 3 -1
     |          |    |     |    |     |  | |  | |--> slow start size threshold, 
-    |          |    |     |    |     |  | |  |      or -1 if the treshold
+    |          |    |     |    |     |  | |  |      or -1 if the threshold
     |          |    |     |    |     |  | |  |      is >= 0xFFFF
     |          |    |     |    |     |  | |  |----> sending congestion window
     |          |    |     |    |     |  | |-------> (ack.quick<<1)|ack.pingpong
index 4e1cc745ec63de85db97de493ebd8ed2365f416c..8590a954df1da94cedae5a71dac6c398b887d1c9 100644 (file)
@@ -346,7 +346,7 @@ Possible modes:
       depending on the load of the system. If the driver detects that the
       system load is too high, the driver tries to shield the system against 
       too much network load by enabling interrupt moderation. If - at a later
-      time - the CPU utilizaton decreases again (or if the network load is 
+      time - the CPU utilization decreases again (or if the network load is 
       negligible) the interrupt moderation will automatically be disabled.
 
 Interrupt moderation should be used when the driver has to handle one or more
index 2f04c9267f890217c0b7d95900d4b0bb22db0ab4..32d3b916afadfe19718ce5f00ffd436a97481402 100644 (file)
@@ -126,7 +126,7 @@ comx0/boardnum      - board number of the SliceCom in the PC (using the 'natural'
 
 Though the options below are to be set on a single interface, they apply to the
 whole board. The restriction, to use them on 'UP' interfaces, is because the 
-command sequence below could lead to unpredicable results.
+command sequence below could lead to unpredictable results.
 
        # echo 0        >boardnum
        # echo internal >clock_source
index 0cf6541476342b237e34822338984d8b2426448d..653978dcea7f0d8e7a5e0515a541b12bff3591c0 100644 (file)
@@ -412,7 +412,7 @@ beta-2.1.4 Jul 2000         o Dynamic interface configuration:
 
 beta3-2.1.4 Jul 2000           o X25 M_BIT Problem fix.
                                o Added the Multi-Port PPP
-                                 Updated utilites for the Multi-Port PPP.
+                                 Updated utilities for the Multi-Port PPP.
 
 2.1.4  Aut 2000
                                o In X25API:
@@ -444,13 +444,13 @@ beta1-2.1.5       Nov 15 2000
                                        
                                o Cpipemon
                                        - Added set FT1 commands to the cpipemon. Thus CSU/DSU
-                                         configuraiton can be performed using cpipemon.
+                                         configuration can be performed using cpipemon.
                                          All systems that cannot run cfgft1 GUI utility should
                                          use cpipemon to configure the on board CSU/DSU.
 
 
                                o Keyboard Led Monitor/Debugger
-                                       - A new utilty /usr/sbin/wpkbdmon uses keyboard leds
+                                       - A new utility /usr/sbin/wpkbdmon uses keyboard leds
                                          to convey operational statistic information of the 
                                          Sangoma WANPIPE cards.
                                        NUM_LOCK    = Line State  (On=connected,    Off=disconnected)
@@ -464,7 +464,7 @@ beta1-2.1.5         Nov 15 2000
                                        - Appropriate number of devices are dynamically loaded 
                                          based on the number of Sangoma cards found.
 
-                                         Note: The kernel configuraiton option 
+                                         Note: The kernel configuration option 
                                                CONFIG_WANPIPE_CARDS has been taken out.
                                        
                                o Fixed the Frame Relay and Chdlc network interfaces so they are
index 9ff966bf76e65be0fc6281d879d673ce0f861143..28037aa1846c89bbf8082007b5e10e470000ac94 100644 (file)
@@ -184,7 +184,7 @@ static const struct pnp_id pnp_dev_table[] = {
 Please note that the character 'X' can be used as a wild card in the function
 portion (last four characters).
 ex:
-       /* Unkown PnP modems */
+       /* Unknown PnP modems */
        {       "PNPCXXX",              UNKNOWN_DEV     },
 
 Supported PnP card IDs can optionally be defined.
index 24edf25b3bb7f17179f23ca644bd3f341943b19a..c750f9f2e76e661d723e15658334f546ef7e06a7 100644 (file)
@@ -153,7 +153,7 @@ Description:
        events, which is implicit if it doesn't even support it in the first
        place).
 
-       Note that the PMC Register in the device's PM Capabilties has a bitmask
+       Note that the PMC Register in the device's PM Capabilities has a bitmask
        of the states it supports generating PME# from. D3hot is bit 3 and
        D3cold is bit 4. So, while a value of 4 as the state may not seem
        semantically correct, it is. 
@@ -268,7 +268,7 @@ to wake the system up. (However, it is possible that a device may support
 some non-standard way of generating a wake event on sleep.)
 
 Bits 15:11 of the PMC (Power Mgmt Capabilities) Register in a device's
-PM Capabilties describe what power states the device supports generating a 
+PM Capabilities describe what power states the device supports generating a 
 wake event from:
 
 +------------------+
index 3e5e5d3ff419a2138b7faa908f49f7d1a27bb3fe..0931a330d362c59dd2cb4ddf7d0fb4eb864f247b 100644 (file)
@@ -62,7 +62,7 @@ setup via another operating system for it to use. Despite the
 inconvenience, this method requires minimal work by the kernel, since
 the firmware will also handle restoring memory contents on resume. 
 
-If the kernel is responsible for persistantly saving state, a mechanism 
+If the kernel is responsible for persistently saving state, a mechanism
 called 'swsusp' (Swap Suspend) is used to write memory contents to
 free swap space. swsusp has some restrictive requirements, but should
 work in most cases. Some, albeit outdated, documentation can be found
index 9ea2208b43b5f712c74b3e9d40762fd47a1a7706..e635e6f1e316ca549834716c95fccc3c61b35748 100644 (file)
@@ -153,7 +153,7 @@ add:
 
 If the thread is needed for writing the image to storage, you should
 instead set the PF_NOFREEZE process flag when creating the thread (and
-be very carefull).
+be very careful).
 
 
 Q: What is the difference between "platform", "shutdown" and
index 27b457c09729e29bafaade3bc240bfaebf755e01..4ac2d641fcb6a9b848fdb3c0761ea57b0ec25cb4 100644 (file)
                          - Change version 16 format to always align
                            property data to 4 bytes. Since tokens are
                            already aligned, that means no specific
-                           required alignement between property size
+                           required alignment between property size
                            and property data. The old style variable
                            alignment would make it impossible to do
                            "simple" insertion of properties using
                            memove (thanks Milton for
                            noticing). Updated kernel patch as well
-                        - Correct a few more alignement constraints
+                        - Correct a few more alignment constraints
                         - Add a chapter about the device-tree
                            compiler and the textural representation of
                            the tree that can be "compiled" by dtc.
@@ -854,7 +854,7 @@ address which can extend beyond that limit.
       console device if any. Typically, if you have serial devices on
       your board, you may want to put the full path to the one set as
       the default console in the firmware here, for the kernel to pick
-      it up as it's own default console. If you look at the funciton
+      it up as its own default console. If you look at the function
       set_preferred_console() in arch/ppc64/kernel/setup.c, you'll see
       that the kernel tries to find out the default console and has
       knowledge of various types like 8250 serial ports. You may want
@@ -1124,7 +1124,7 @@ should have the following properties:
        - interrupt-parent : contains the phandle of the interrupt
           controller which handles interrupts for this device
        - interrupts : a list of tuples representing the interrupt
-          number and the interrupt sense and level for each interupt
+          number and the interrupt sense and level for each interrupt
           for this device.
 
 This information is used by the kernel to build the interrupt table
index 8529a17ffaa16a17060d38232085f99e5e8a3624..535f69fab45fa5c1632505abb60b2a119e4c8d8e 100644 (file)
@@ -170,7 +170,7 @@ any point:
  1) the 'head' pointer or an subsequent linked list pointer
     is not a valid address of a user space word
  2) the calculated location of the 'lock word' (address plus
-    'offset') is not the valud address of a 32 bit user space
+    'offset') is not the valid address of a 32 bit user space
     word
  3) if the list contains more than 1 million (subject to
     future kernel configuration changes) elements.
index 76e8064b8c3a5ccb60e6cbb2f55ad5d455d097b0..0a9446a53bd1cd714e97c38695ce0d3c8a883ce8 100644 (file)
@@ -181,7 +181,7 @@ for new threads, without the need of another syscall.]
 So there is virtually zero overhead for tasks not using robust futexes,
 and even for robust futex users, there is only one extra syscall per
 thread lifetime, and the cleanup operation, if it happens, is fast and
-straightforward. The kernel doesnt have any internal distinction between
+straightforward. The kernel doesn't have any internal distinction between
 robust and normal futexes.
 
 If a futex is found to be held at exit time, the kernel sets the
index 29dee792c8875d00a09fe7ce5aa395e6dcf02186..41a8b07da05ad48c2ee048e28c3b0541b4960ee3 100644 (file)
@@ -75,8 +75,8 @@ name of the respective module is given in square brackets.
 
 - SHA1 Digest Algorithm [sha1 -> sha1_z990]
 - DES Encrypt/Decrypt Algorithm (64bit key) [des -> des_z990]
-- Tripple DES Encrypt/Decrypt Algorithm (128bit key) [des3_ede128 -> des_z990]
-- Tripple DES Encrypt/Decrypt Algorithm (192bit key) [des3_ede -> des_z990]
+- Triple DES Encrypt/Decrypt Algorithm (128bit key) [des3_ede128 -> des_z990]
+- Triple DES Encrypt/Decrypt Algorithm (192bit key) [des3_ede -> des_z990]
 
 In order to load, for example, the sha1_z990 module when the sha1 algorithm is
 requested (see 3.2.) add 'alias sha1 sha1_z990' to /etc/modprobe.conf.
index 904d49e90ef267545b00546c1960919cfbe6d2fa..6aa9a891f3d00ec20df21d49c4a531f1ba574a2e 100644 (file)
@@ -127,7 +127,7 @@ The following information is available in this file:
         - Correct a reference to free'ed memory during controller
           shutdown.
         - Reset the bus on an SE->LVD change.  This is required
-          to reset our transcievers.
+          to reset our transceivers.
 
    1.3.5 (March 24th, 2003)
         - Fix a few register window mode bugs.
@@ -169,7 +169,7 @@ The following information is available in this file:
    1.3.0 (January 21st, 2003)
         - Full regression testing for all U320 products completed.
         - Added abort and target/lun reset error recovery handler and
-          interrupt coalessing.
+          interrupt coalescing.
 
    1.2.0 (November 14th, 2002)
         - Added support for Domain Validation
index c92f4473193b06dbfd038e21a18ca4ccdaa2a213..05667e7308d40cfecad6cefbedfcc7bbaedcffd0 100644 (file)
@@ -256,7 +256,7 @@ linux-1.1.x and fairly stable since linux-1.2.x, and are also in FreeBSD
              En/Disable High Byte LVD Termination
 
        The upper 2 bits that deal with LVD termination only apply to Ultra2
-       controllers.  Futhermore, due to the current Ultra2 controller
+       controllers.  Furthermore, due to the current Ultra2 controller
        designs, these bits are tied together such that setting either bit
        enables both low and high byte LVD termination.  It is not possible
        to only set high or low byte LVD termination in this manner.  This is
@@ -436,7 +436,7 @@ linux-1.1.x and fairly stable since linux-1.2.x, and are also in FreeBSD
     the commas to periods, insmod won't interpret this as more than one
     string and write junk into our binary image.  I consider it a bug in
     the insmod program that even if you wrap your string in quotes (quotes
-    that pass the shell mind you and that insmod sees) it still treates
+    that pass the shell mind you and that insmod sees) it still treats
     a comma inside of those quotes as starting a new variable, resulting
     in memory scribbles if you don't switch the commas to periods.
 
index 35f6b8ed229587eb5a9733fe48594b9123b5e32e..9707941704e36ece47dd763cc9ac21dcf5d2468b 100644 (file)
       This needs the RD-Bit to be disabled on IM_OTHER_SCSI_CMD_CMD which 
       allows data to be written from the system to the device. It is a
       necessary step to be allowed to set blocksize of SCSI-tape-drives and 
-      the tape-speed, whithout confusing the SCSI-Subsystem.
+      the tape-speed, without confusing the SCSI-Subsystem.
    2) The recognition of a tape is included in the check_devices routine.
       This is done by checking for TYPE_TAPE, that is already defined in
       the kernel-scsi-environment. The markup of a tape is done in the 
       of troubles with some controllers and after I wanted to apply some
       extensions, it jumped out in the same situation, on my w/cache, as like 
       on D. Weinehalls' Model 56, having integrated SCSI. This gave me the 
-      descissive hint to move the code-part out and declare it global. Now,
-      it seems to work by far much better an more stable. Let us see, what
+      decisive hint to move the code-part out and declare it global. Now
+      it seems to work far better and more stable. Let us see what
       the world thinks of it...
    3) By the way, only Sony DAT-drives seem to show density code 0x13. A
       test with a HP drive gave right results, so the problem is vendor-
    A long period of collecting bugreports from all corners of the world
    now lead to the following corrections to the code:
    1) SCSI-2 F/W support crashed with a COMMAND ERROR. The reason for this 
-      was, that it is possible to disbale Fast-SCSI for the external bus.
-      The feature-control command, where this crash appeared regularly tried
+      was that it is possible to disable Fast-SCSI for the external bus.
+      The feature-control command, where this crash appeared regularly, tried
       to set the maximum speed of 10MHz synchronous transfer speed and that
-      reports a COMMAND ERROR, if external bus Fast-SCSI is disabled. Now,
+      reports a COMMAND ERROR if external bus Fast-SCSI is disabled. Now,
       the feature-command probes down from maximum speed until the adapter 
       stops to complain, which is at the same time the maximum possible
       speed selected in the reference program. So, F/W external can run at
       completed in such a way, that they are now completely conform to the
       demands in the technical description of IBM. Main candidates were the
       DEVICE_INQUIRY, REQUEST_SENSE and DEVICE_CAPACITY commands. They must
-      be tranferred by bypassing the internal command buffer of the adapter
+      be transferred by bypassing the internal command buffer of the adapter
       or else the response can be a random result. GET_POS_INFO would be more
       safe in usage, if one could use the SUPRESS_EXCEPTION_SHORT, but this
       is not allowed by the technical references of IBM. (Sorry, folks, the
index 80f10404264576cf7dd76698fdc3a22253bccbba..c3e2a90475d2519d7fd5339068b061062c628e8d 100644 (file)
@@ -24,7 +24,7 @@ UPDATE NEWS: version 1.32 - 28 Mar 98
 UPDATE NEWS: version 1.31 - 6 Jul 97
 
    Fixed a bug that caused incorrect SCSI status bytes to be
-   returned from commands sent to LUN's greater than 0. This
+   returned from commands sent to LUNs greater than 0. This
    means that CDROM changers work now! Fixed a bug in the
    handling of command-line arguments when loaded as a module.
    Also put all the header data in in2000.h where it belongs.
index 9e2078b2a615c332f227bc4bd841416678f2b4f7..aa54f54c4a50b3e52a0f7f82d929af0757158506 100644 (file)
@@ -393,7 +393,7 @@ struct sas_task {
        task_proto -- _one_ of enum sas_proto
        scatter -- pointer to scatter gather list array
        num_scatter -- number of elements in scatter
-       total_xfer_len -- total number of bytes expected to be transfered
+       total_xfer_len -- total number of bytes expected to be transferred
        data_dir -- PCI_DMA_...
        task_done -- callback when the task has finished execution
 };
index 58ad8db333d9f6b5aeb2f011b0f9f0ee64bf70c0..caf10b1551850e426906e5f8eb6439eb8a9d9743 100644 (file)
@@ -115,7 +115,7 @@ SCSI standard documentations are available at SYMBIOS ftp server:
 
           ftp://ftp.symbios.com/
 
-Usefull SCSI tools written by Eric Youngdale are available at tsx-11:
+Useful SCSI tools written by Eric Youngdale are available at tsx-11:
 
           ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsiinfo-X.Y.tar.gz
           ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsidev-X.Y.tar.gz
index d74bbd29eb3a3f2cc576e1fdc979ce2b8f99ccc9..032399b16a539e5be25be8b04d065b8798bc57ed 100644 (file)
@@ -88,7 +88,7 @@ If the module finds the changer, it prints some messages about the
 device [ try "dmesg" if you don't see anything ] and should show up in
 /proc/devices. If not....  some changers use ID ? / LUN 0 for the
 device and ID ? / LUN 1 for the robot mechanism. But Linux does *not*
-look for LUN's other than 0 as default, becauce there are to many
+look for LUNs other than 0 as default, because there are too many
 broken devices. So you can try:
 
   1) echo "scsi add-single-device 0 0 ID 1" > /proc/scsi/scsi
@@ -107,7 +107,7 @@ because the kernel will translate the error codes into human-readable
 strings then.
 
 You can display these messages with the dmesg command (or check the
-logfiles).  If you email me some question becauce of a problem with the
+logfiles).  If you email me some question because of a problem with the
 driver, please include these messages.
 
 
index b964eef2f62fb5236caa6bd3b0cb33d19c645ccc..7acbebb17fa6c42bd07f1da11311dde70b4bc60b 100644 (file)
@@ -75,7 +75,7 @@ with the command.
 
  - otherwise
        scsi_eh_scmd_add(scmd, 0) is invoked for the command.  See
-       [1-3] for details of this funciton.
+       [1-3] for details of this function.
 
 
 [1-2-2] Completing a scmd w/ timeout
index 5ff65b184265f9919ea8f1404a6c6ba63f617034..3c12422f7f41bf67cc6d365937090a81176eb0e0 100644 (file)
@@ -261,7 +261,7 @@ pairs are separated with a comma (no spaces allowed). A colon can be
 used instead of the equal mark. The definition is prepended by the
 string st=. Here is an example:
 
-       st=buffer_kbs:64,write_threhold_kbs:60
+       st=buffer_kbs:64,write_threshold_kbs:60
 
 The following syntax used by the old kernel versions is also supported:
 
index 26c8a08ca3eaf378fffc65805857df02e8d66003..2c1745a9df0052fa634489d3f4b43dd1828a078b 100644 (file)
@@ -609,7 +609,7 @@ appropriate mailing lists or news-groups.  Send me a copy in order to
 be sure I will receive it.  Obviously, a bug in the driver code is
 possible.
 
-  My cyrrent email address: Gerard Roudier <groudier@free.fr>
+  My current email address: Gerard Roudier <groudier@free.fr>
 
 Allowing disconnections is important if you use several devices on
 your SCSI bus but often causes problems with buggy devices.
index 2d8f403eb6eb98a49c78f92bbc41c9172a21646d..ccf1cebe744f8b4a6901ff7f61bd23029562344a 100644 (file)
@@ -942,13 +942,13 @@ replicas continue to be exactly same.
        ->mnt_slave
        ->mnt_master
 
-       ->mnt_share links togather all the mount to/from which this vfsmount
+       ->mnt_share links together all the mount to/from which this vfsmount
                send/receives propagation events.
 
        ->mnt_slave_list links all the mounts to which this vfsmount propagates
                to.
 
-       ->mnt_slave links togather all the slaves that its master vfsmount
+       ->mnt_slave links together all the slaves that its master vfsmount
                propagates to.
 
        ->mnt_master points to the master vfsmount from which this vfsmount
index 3472d9c4ef1b0e637072e75690e474e834e348c5..9fef210ab50ab3914cd6e7d9c261edcb72ec489f 100644 (file)
@@ -955,7 +955,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
                  dmx6fire, dsp24, dsp24_value, dsp24_71, ez8,
                  phase88, mediastation
     omni       - Omni I/O support for MidiMan M-Audio Delta44/66
-    cs8427_timeout - reset timeout for the CS8427 chip (S/PDIF transciever)
+    cs8427_timeout - reset timeout for the CS8427 chip (S/PDIF transceiver)
                      in msec resolution, default value is 500 (0.5 sec)
 
     This module supports multiple cards and autoprobe. Note: The consumer part
index 5132fd95e0743565c2246eb27b1e22f586a53984..7f10dc6ff28ca443cc0a9e6f8d86734e6399e06f 100644 (file)
@@ -6,7 +6,7 @@ This is based on SB-Live-mixer.txt.
 
 The EMU10K2 chips have a DSP part which can be programmed to support 
 various ways of sample processing, which is described here.
-(This acticle does not deal with the overall functionality of the 
+(This article does not deal with the overall functionality of the 
 EMU10K2 chips. See the manuals section for further details.)
 
 The ALSA driver programs this portion of chip by default code
index 651adaf604733a5114ed2bd86156c9e2a50a040c..f5639d40521df5a60706d542d5dd93ace9f24c1c 100644 (file)
@@ -5,7 +5,7 @@
 
 The EMU10K1 chips have a DSP part which can be programmed to support
 various ways of sample processing, which is described here.
-(This acticle does not deal with the overall functionality of the 
+(This article does not deal with the overall functionality of the 
 EMU10K1 chips. See the manuals section for further details.)
 
 The ALSA driver programs this portion of chip by default code
index 02a481225b0d497c9182bcc2bcf40bb06079b4d5..c815c5206e8401e7f1f7c188bdd4b70beb27d787 100644 (file)
@@ -50,7 +50,7 @@ Review cycle:
    Contact the kernel security team for more details on this procedure.
 
 
-Review committe:
+Review committee:
 
  - This is made up of a number of kernel developers who have volunteered for
    this task, and a few that haven't.
index 5c3a51905969cabc9ef7d1f26178aadbb476d612..aa986a35e9945071abed471776565a2cf4644787 100644 (file)
@@ -146,7 +146,7 @@ or otherwise protected/tainted binaries. The modes are
        readable by root only. This allows the end user to remove
        such a dump but not access it directly. For security reasons
        core dumps in this mode will not overwrite one another or
-       other files. This mode is appropriate when adminstrators are
+       other files. This mode is appropriate when administrators are
        attempting to debug problems in a normal environment.
 
 ==============================================================
index 20d0d797f539ce51d18f903aa4aec942ead16643..e96a341eb7e425249cd19babb7e1f8f972001fa2 100644 (file)
@@ -129,7 +129,7 @@ the high water marks for each per cpu page list.
 
 zone_reclaim_mode:
 
-Zone_reclaim_mode allows to set more or less agressive approaches to
+Zone_reclaim_mode allows someone to set more or less aggressive approaches to
 reclaim memory when a zone runs out of memory. If it is set to zero then no
 zone reclaim occurs. Allocations will be satisfied from other zones / nodes
 in the system.
index b60590eca18fbc168a6aaa1800cf1163b06111ac..628013f944c4e0c090b2e70b4d625e6942948e27 100644 (file)
 
 
 
-  Making it world-writeable looks bad, but it seems not to be
+  Making it world-writable looks bad, but it seems not to be
   exploitable as a security hole.  However, it does allow anyone to cre-
   ate useless tap devices (useless because they can't configure them),
   which is a DOS attack.  A somewhat more secure alternative would to be
index 6a790754e963bacbd536b59e5c9b13ac24e21f83..6e8c9f1d2f223448b4e070ee1801e2c9ede36e79 100644 (file)
@@ -8,7 +8,7 @@ interfaces, but have similar sorts of communication needs. The two big
 examples for this are power devices (especially uninterruptable power
 supplies) and monitor control on higher end monitors.
 
-To support these disparite requirements, the Linux USB system provides
+To support these disparate requirements, the Linux USB system provides
 HID events to two separate interfaces:
 * the input subsystem, which converts HID events into normal input
 device interfaces (such as keyboard, mouse and joystick) and a
index ab21db454694a603b31bdbecb627cd6b17d2d8a1..aee715af7db741be230d754dc468bbb9709e81d6 100644 (file)
@@ -24,10 +24,10 @@ are in no way responsible for any damage that may occur, no matter how
 inconsequential.
 
 It seems that the Rio has a problem when sending .mp3 with low batteries.
-I suggest when the batteries are low and want to transfer stuff that you
+I suggest when the batteries are low and you want to transfer stuff that you
 replace it with a fresh one. In my case, what happened is I lost two 16kb
 blocks (they are no longer usable to store information to it). But I don't
-know if thats normal or not. It could simply be a problem with the flash 
+know if that's normal or not; it could simply be a problem with the flash 
 memory.
 
 In an extreme case, I left my Rio playing overnight and the batteries wore 
index 50436e1663eaa18b043c5370e5c16eb63dfe18e7..d61f6e7865def51b2ba281daa01d4c873f7311c9 100644 (file)
@@ -175,7 +175,7 @@ Keyspan USA-series Serial Adapters
   
   Current status:
     The USA-18X, USA-28X, USA-19, USA-19W and USA-49W are supported and
-    have been pretty throughly tested at various baud rates with 8-N-1
+    have been pretty thoroughly tested at various baud rates with 8-N-1
     character settings.  Other character lengths and parity setups are
     presently untested.
 
@@ -253,7 +253,7 @@ Cypress M8 CY4601 Family Serial Driver
        together without hacking the adapter to set the line high.
 
        The driver is smp safe.  Performance with the driver is rather low when using
-       it for transfering files.  This is being worked on, but I would be willing to
+       it for transferring files.  This is being worked on, but I would be willing to
        accept patches.  An urb queue or packet buffer would likely fit the bill here.
 
        If you have any questions, problems, patches, feature requests, etc. you can
@@ -297,7 +297,7 @@ Belkin USB Serial Adapter F5U103
       Parity       N,E,O,M,S
       Handshake    None, Software (XON/XOFF), Hardware (CTSRTS,CTSDTR)*
       Break        Set and clear
-      Line contr Input/Output query and control **
+      Line control Input/Output query and control **
 
       *  Hardware input flow control is only enabled for firmware
          levels above 2.06.  Read source code comments describing Belkin
@@ -309,7 +309,7 @@ Belkin USB Serial Adapter F5U103
          automatic hardware flow control.
 
   TO DO List:
-    -- Add true modem contol line query capability.  Currently tracks the
+    -- Add true modem control line query capability.  Currently tracks the
        states reported by the interrupt and the states requested.
     -- Add error reporting back to application for UART error conditions.
     -- Add support for flush ioctls.
index 7e8ae83e9847bcdaad064cb1eaa2c0e609da4b66..8d16f6f3c4eccbbba5e28f1e7f60db24ad942fa7 100644 (file)
@@ -214,7 +214,7 @@ returned value is the temperature in degrees fahrenheit.
 
 Finally the SETOPTIONS ioctl can be used to control some aspects of
 the cards operation; right now the pcwd driver is the only one
-supporting thiss ioctl.
+supporting this ioctl.
 
     int options = 0;
     ioctl(fd, WDIOC_SETOPTIONS, options);
index e182992ff79955834ea9ab7871afd4003fdcdc22..846e77a787105a6f16e8332c0a30e879375e41eb 100644 (file)
@@ -155,16 +155,16 @@ L:        netdev@vger.kernel.org
 S:     Maintained
 
 9P FILE SYSTEM
-P:      Eric Van Hensbergen
-M:      ericvh@gmail.com
-P:      Ron Minnich
-M:      rminnich@lanl.gov
-P:      Latchesar Ionkov
-M:      lucho@ionkov.net
-L:      v9fs-developer@lists.sourceforge.net
-W:      http://v9fs.sf.net
-T:      git kernel.org:/pub/scm/linux/kernel/ericvh/v9fs.git
-S:      Maintained
+P:     Eric Van Hensbergen
+M:     ericvh@gmail.com
+P:     Ron Minnich
+M:     rminnich@lanl.gov
+P:     Latchesar Ionkov
+M:     lucho@ionkov.net
+L:     v9fs-developer@lists.sourceforge.net
+W:     http://v9fs.sf.net
+T:     git kernel.org:/pub/scm/linux/kernel/ericvh/v9fs.git
+S:     Maintained
 
 A2232 SERIAL BOARD DRIVER
 P:     Enver Haase
@@ -290,8 +290,8 @@ M:  ink@jurassic.park.msu.ru
 S:     Maintained for 2.4; PCI support for 2.6.
 
 AMD GEODE PROCESSOR/CHIPSET SUPPORT
-P:      Jordan Crouse
-M:      info-linux@geode.amd.com
+P:     Jordan Crouse
+M:     info-linux@geode.amd.com
 L:     info-linux@geode.amd.com
 W:     http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html
 S:     Supported
@@ -601,13 +601,13 @@ M:        maxk@qualcomm.com
 S:     Maintained
 
 BONDING DRIVER
-P:   Chad Tindel
-M:   ctindel@users.sourceforge.net
-P:   Jay Vosburgh
-M:   fubar@us.ibm.com
-L:   bonding-devel@lists.sourceforge.net
-W:   http://sourceforge.net/projects/bonding/
-S:   Supported
+P:     Chad Tindel
+M:     ctindel@users.sourceforge.net
+P:     Jay Vosburgh
+M:     fubar@us.ibm.com
+L:     bonding-devel@lists.sourceforge.net
+W:     http://sourceforge.net/projects/bonding/
+S:     Supported
 
 BROADBAND PROCESSOR ARCHITECTURE
 P:     Arnd Bergmann
@@ -744,8 +744,8 @@ W:  http://www.bullopensource.org/cpuset/
 S:     Supported
 
 CRAMFS FILESYSTEM
-W:     http://sourceforge.net/projects/cramfs/
-S:     Orphan
+W:     http://sourceforge.net/projects/cramfs/
+S:     Orphan
 
 CRIS PORT
 P:     Mikael Starvik
@@ -1054,11 +1054,11 @@ W:      http://sourceforge.net/projects/emu10k1/
 S:     Maintained
 
 EMULEX LPFC FC SCSI DRIVER
-P:      James Smart
-M:      james.smart@emulex.com
-L:      linux-scsi@vger.kernel.org
-W:      http://sourceforge.net/projects/lpfcxxxx
-S:      Supported
+P:     James Smart
+M:     james.smart@emulex.com
+L:     linux-scsi@vger.kernel.org
+W:     http://sourceforge.net/projects/lpfcxxxx
+S:     Supported
 
 EPSON 1355 FRAMEBUFFER DRIVER
 P:     Christopher Hoover
@@ -1495,16 +1495,16 @@ L:      linux-kernel@vger.kernel.org
 S:     Maintained
 
 INTEL FRAMEBUFFER DRIVER (excluding 810 and 815)
-P:      Sylvain Meyer
-M:      sylvain.meyer@worldonline.fr
-L:      linux-fbdev-devel@lists.sourceforge.net
-S:      Maintained
+P:     Sylvain Meyer
+M:     sylvain.meyer@worldonline.fr
+L:     linux-fbdev-devel@lists.sourceforge.net
+S:     Maintained
 
 INTEL 810/815 FRAMEBUFFER DRIVER
-P:      Antonino Daplas
-M:      adaplas@pol.net
-L:      linux-fbdev-devel@lists.sourceforge.net
-S:      Maintained
+P:     Antonino Daplas
+M:     adaplas@pol.net
+L:     linux-fbdev-devel@lists.sourceforge.net
+S:     Maintained
 
 INTEL APIC/IOAPIC, LOWLEVEL X86 SMP SUPPORT
 P:     Ingo Molnar
@@ -1830,11 +1830,11 @@ L:      linuxppc-embedded@ozlabs.org
 S:     Maintained
 
 LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX
-P:     Kumar Gala
-M:     galak@kernel.crashing.org
-W:     http://www.penguinppc.org/
-L:     linuxppc-embedded@ozlabs.org
-S:     Maintained
+P:     Kumar Gala
+M:     galak@kernel.crashing.org
+W:     http://www.penguinppc.org/
+L:     linuxppc-embedded@ozlabs.org
+S:     Maintained
 
 LINUX FOR POWERPC PA SEMI PWRFICIENT
 P:     Olof Johansson
@@ -1933,10 +1933,10 @@ W:      http://www.syskonnect.com
 S:     Supported
 
 MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7
-P: Michael Kerrisk
-M: mtk-manpages@gmx.net
-W: ftp://ftp.kernel.org/pub/linux/docs/manpages
-S: Maintained
+P:     Michael Kerrisk
+M:     mtk-manpages@gmx.net
+W:     ftp://ftp.kernel.org/pub/linux/docs/manpages
+S:     Maintained
 
 MARVELL MV643XX ETHERNET DRIVER
 P:     Dale Farnsworth
@@ -1953,11 +1953,11 @@ L:      linux-fbdev-devel@lists.sourceforge.net
 S:     Maintained
 
 MEGARAID SCSI DRIVERS
-P:     Neela Syam Kolli
-M:     Neela.Kolli@engenio.com
-S:     linux-scsi@vger.kernel.org
-W:     http://megaraid.lsilogic.com
-S:     Maintained
+P:     Neela Syam Kolli
+M:     Neela.Kolli@engenio.com
+S:     linux-scsi@vger.kernel.org
+W:     http://megaraid.lsilogic.com
+S:     Maintained
 
 MEMORY MANAGEMENT
 L:     linux-mm@kvack.org
@@ -2186,10 +2186,10 @@ T:      git kernel.org:/pub/scm/linux/kernel/git/aia21/ntfs-2.6.git
 S:     Maintained
 
 NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER
-P:      Antonino Daplas
-M:      adaplas@pol.net
-L:      linux-fbdev-devel@lists.sourceforge.net
-S:      Maintained
+P:     Antonino Daplas
+M:     adaplas@pol.net
+L:     linux-fbdev-devel@lists.sourceforge.net
+S:     Maintained
 
 OPENCORES I2C BUS DRIVER
 P:     Peter Korsgaard
@@ -2539,10 +2539,10 @@ RISCOM8 DRIVER
 S:     Orphan
 
 S3 SAVAGE FRAMEBUFFER DRIVER
-P:      Antonino Daplas
-M:      adaplas@pol.net
-L:      linux-fbdev-devel@lists.sourceforge.net
-S:      Maintained
+P:     Antonino Daplas
+M:     adaplas@pol.net
+L:     linux-fbdev-devel@lists.sourceforge.net
+S:     Maintained
 
 S390
 P:     Martin Schwidefsky
@@ -2623,10 +2623,10 @@ L:      linux-scsi@vger.kernel.org
 S:     Maintained
 
 SCTP PROTOCOL
-P: Sridhar Samudrala
-M: sri@us.ibm.com
-L: lksctp-developers@lists.sourceforge.net
-S: Supported
+P:     Sridhar Samudrala
+M:     sri@us.ibm.com
+L:     lksctp-developers@lists.sourceforge.net
+S:     Supported
 
 SCx200 CPU SUPPORT
 P:     Jim Cromie
@@ -2794,9 +2794,9 @@ L:        tpmdd-devel@lists.sourceforge.net
 S:     Maintained
 
 Telecom Clock Driver for MCPL0010
-P: Mark Gross
-M: mark.gross@intel.com
-S: Supported
+P:     Mark Gross
+M:     mark.gross@intel.com
+S:     Supported
 
 TENSILICA XTENSA PORT (xtensa):
 P:     Chris Zankel
@@ -2943,9 +2943,9 @@ L:        linux-kernel@vger.kernel.org
 S:     Maintained
 
 TI PARALLEL LINK CABLE DRIVER
-P:     Romain Lievin
-M:     roms@lpg.ticalc.org
-S:     Maintained
+P:     Romain Lievin
+M:     roms@lpg.ticalc.org
+S:     Maintained
 
 TIPC NETWORK LAYER
 P:     Per Liden
@@ -2995,12 +2995,12 @@ L:      linux-kernel@vger.kernel.org
 S:     Maintained
 
 TRIVIAL PATCHES
-P:      Adrian Bunk
-M:      trivial@kernel.org
-L:      linux-kernel@vger.kernel.org
-W:      http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/
-T:      git kernel.org:/pub/scm/linux/kernel/git/bunk/trivial.git
-S:      Maintained
+P:     Adrian Bunk
+M:     trivial@kernel.org
+L:     linux-kernel@vger.kernel.org
+W:     http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/
+T:     git kernel.org:/pub/scm/linux/kernel/git/bunk/trivial.git
+S:     Maintained
 
 TMS380 TOKEN-RING NETWORK DRIVER
 P:     Adam Fritzler
index 57f23b4653927a5fcb83c9eaed9cce6cd17ca583..e316bd93313f656215588f30488188860c9da7b7 100644 (file)
@@ -133,7 +133,7 @@ config IXP4XX_INDIRECT_PCI
              into the kernel and we can use the standard read[bwl]/write[bwl]
              macros. This is the preferred method due to speed but it
              limits the system to just 64MB of PCI memory. This can be 
-             problamatic if using video cards and other memory-heavy devices.
+             problematic if using video cards and other memory-heavy devices.
           
           2) If > 64MB of memory space is required, the IXP4xx can be 
             configured to use indirect registers to access PCI This allows 
index 147b01928a9b49b612e7ae3bf16c3d2d84f816c6..6f4c6a1798c13ace0388cdef77df2427a17134c6 100644 (file)
@@ -8,7 +8,7 @@ config MACH_KEV7A400
        help
          Say Y here if you are using the Sharp KEV7A400 development
          board.  This hardware is discontinued, so I'd be very
-         suprised if you wanted this option.
+         surprised if you wanted this option.
 
 config MACH_LPD7A400
        bool "LPD7A400 Card Engine"
index 63965c78de8c652be823c23b9de504231c1a6479..9aa26b99045dfd58251363ac957d72d73ad5b8b4 100644 (file)
@@ -91,7 +91,7 @@ config SMDK2440_CPU2442
 config MACH_S3C2413
        bool
        help
-         Internal node for S3C2413 verison of SMDK2413, so that
+         Internal node for S3C2413 version of SMDK2413, so that
          machine_is_s3c2413() will work when MACH_SMDK2413 is
          selected
 
index c0bfb8212b7742abda15da17ffd47b09c3fe24e2..b09a19f87d682d084dcc08995ecfb18c085df4b9 100644 (file)
@@ -197,7 +197,7 @@ config CPU_ARM940T
        select CPU_CP15_MPU
        help
          ARM940T is a member of the ARM9TDMI family of general-
-         purpose microprocessors with MPU and seperate 4KB
+         purpose microprocessors with MPU and separate 4KB
          instruction and 4KB data cases, each with a 4-word line
          length.
 
index 44eb1b9accb374c89f3a0f75ebe39693ae53a7f0..c7ea9efd01049875e9e8a46f99b779480d008189 100644 (file)
@@ -323,7 +323,7 @@ config ETRAX_DEF_R_WAITSTATES
        depends on ETRAX_ARCH_V10
        default "95a6"
        help
-         Waitstates for SRAM, Flash and peripherials (not DRAM).  95f8 is a
+         Waitstates for SRAM, Flash and peripherals (not DRAM).  95f8 is a
          good choice for most Axis products...
 
 config ETRAX_DEF_R_BUS_CONFIG
index 734d5f3a530411ef71450325de866394daca1055..e7e724bc0ba6d701688365c118c57f59795ab697 100644 (file)
@@ -839,7 +839,7 @@ config ETRAX_DS1302_TRICKLE_CHARGE
        default "0"
        help
          This controls the initial value of the trickle charge register.
-         0 = disabled (use this if you are unsure or have a non rechargable battery)
+         0 = disabled (use this if you are unsure or have a non rechargeable battery)
          Otherwise the following values can be OR:ed together to control the
          charge current:
          1 = 2kohm, 2 = 4kohm, 3 = 4kohm
index 6e1f191a71e3f96b62744814b91b4c5c5cceffae..284ebfda03f05a672def45c46777f62f01c91034 100644 (file)
@@ -1,7 +1,7 @@
 /*!*****************************************************************************
 *!
-*!  Implements an interface for i2c compatible eeproms to run under linux.
-*!  Supports 2k, 8k(?) and 16k. Uses adaptive timing adjustents by
+*!  Implements an interface for i2c compatible eeproms to run under Linux.
+*!  Supports 2k, 8k(?) and 16k. Uses adaptive timing adjustments by
 *!  Johan.Adolfsson@axis.com
 *!
 *!  Probing results:
@@ -51,7 +51,7 @@
 *!  Revision 1.8  2001/06/15 13:24:29  jonashg
 *!  * Added verification of pointers from userspace in read and write.
 *!  * Made busy counter volatile.
-*!  * Added define for inital write delay.
+*!  * Added define for initial write delay.
 *!  * Removed warnings by using loff_t instead of unsigned long.
 *!
 *!  Revision 1.7  2001/06/14 15:26:54  jonashg
index 6114596c3b3369298546cc355d8b8c52bc8a6517..092c724a645f8096b32c07c60de600dd665da932 100644 (file)
@@ -47,7 +47,7 @@
 *! Update Port B register and shadow even when running with hardware support
 *!   to avoid glitches when reading bits
 *! Never set direction to out in i2c_inbyte
-*! Removed incorrect clock togling at end of i2c_inbyte
+*! Removed incorrect clock toggling at end of i2c_inbyte
 *!
 *! Revision 1.8  2002/08/13 06:31:53  starvik
 *! Made SDA and SCL line configurable
index 34528da9881792a029bf23163b143937ea1dc18f..07628a13c6c492c8c9574caeefd5c5fca6c3a894 100644 (file)
@@ -33,7 +33,7 @@
 *!
 *! Revision 1.2  2002/11/19 14:35:24  starvik
 *! Changes from linux 2.4
-*! Changed struct initializer syntax to the currently prefered notation
+*! Changed struct initializer syntax to the currently preferred notation
 *!
 *! Revision 1.1  2001/12/17 13:59:27  bjornw
 *! Initial revision
index a33097f95362bf8f6ad180941111dd9701d03fef..f64624fc4504bef716e5971ae5290011c5fed9f0 100644 (file)
@@ -88,7 +88,7 @@ config ETRAX_SERIAL_PORT0_DMA7_IN
        help
          Enables the DMA7 input channel for ser0 (ttyS0).
          If you do not enable DMA, an interrupt for each character will be
-         used when receiveing data.
+         used when receiving data.
          Normally you want to use DMA, unless you use the DMA channel for
          something else.
 
@@ -157,7 +157,7 @@ config ETRAX_SERIAL_PORT1_DMA5_IN
        help
          Enables the DMA5 input channel for ser1 (ttyS1).
          If you do not enable DMA, an interrupt for each character will be
-         used when receiveing data.
+         used when receiving data.
          Normally you want this on, unless you use the DMA channel for
          something else.
 
@@ -228,7 +228,7 @@ config ETRAX_SERIAL_PORT2_DMA3_IN
        help
          Enables the DMA3 input channel for ser2 (ttyS2).
          If you do not enable DMA, an interrupt for each character will be
-         used when receiveing data.
+         used when receiving data.
          Normally you want to use DMA, unless you use the DMA channel for
          something else.
 
@@ -297,7 +297,7 @@ config ETRAX_SERIAL_PORT3_DMA9_IN
        help
          Enables the DMA9 input channel for ser3 (ttyS3).
          If you do not enable DMA, an interrupt for each character will be
-         used when receiveing data.
+         used when receiving data.
          Normally you want to use DMA, unless you use the DMA channel for
          something else.
 
index fde8bea85cee82b26ca31a34db989aab39e0a723..ab0c327e79dcc3ffde57dce2bfc50b97b9ed69ba 100644 (file)
@@ -156,14 +156,14 @@ static struct file_operations cpuid_fops = {
        .open = cpuid_open,
 };
 
-static int cpuid_class_device_create(int i)
+static int cpuid_device_create(int i)
 {
        int err = 0;
-       struct class_device *class_err;
+       struct device *dev;
 
-       class_err = class_device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, i), NULL, "cpu%d",i);
-       if (IS_ERR(class_err))
-               err = PTR_ERR(class_err);
+       dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, i), "cpu%d",i);
+       if (IS_ERR(dev))
+               err = PTR_ERR(dev);
        return err;
 }
 
@@ -174,10 +174,10 @@ static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long ac
 
        switch (action) {
        case CPU_ONLINE:
-               cpuid_class_device_create(cpu);
+               cpuid_device_create(cpu);
                break;
        case CPU_DEAD:
-               class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu));
+               device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu));
                break;
        }
        return NOTIFY_OK;
@@ -206,7 +206,7 @@ static int __init cpuid_init(void)
                goto out_chrdev;
        }
        for_each_online_cpu(i) {
-               err = cpuid_class_device_create(i);
+               err = cpuid_device_create(i);
                if (err != 0) 
                        goto out_class;
        }
@@ -218,7 +218,7 @@ static int __init cpuid_init(void)
 out_class:
        i = 0;
        for_each_online_cpu(i) {
-               class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, i));
+               device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, i));
        }
        class_destroy(cpuid_class);
 out_chrdev:
@@ -232,7 +232,7 @@ static void __exit cpuid_exit(void)
        int cpu = 0;
 
        for_each_online_cpu(cpu)
-               class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu));
+               device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu));
        class_destroy(cpuid_class);
        unregister_chrdev(CPUID_MAJOR, "cpu/cpuid");
        unregister_hotcpu_notifier(&cpuid_class_cpu_notifier);
index d535cdbbfd256f5087480f7a75eebc640e9cebc3..a773f776c9ea3bef1627644e367f224f62105921 100644 (file)
@@ -239,14 +239,14 @@ static struct file_operations msr_fops = {
        .open = msr_open,
 };
 
-static int msr_class_device_create(int i)
+static int msr_device_create(int i)
 {
        int err = 0;
-       struct class_device *class_err;
+       struct device *dev;
 
-       class_err = class_device_create(msr_class, NULL, MKDEV(MSR_MAJOR, i), NULL, "msr%d",i);
-       if (IS_ERR(class_err)) 
-               err = PTR_ERR(class_err);
+       dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, i), "msr%d",i);
+       if (IS_ERR(dev))
+               err = PTR_ERR(dev);
        return err;
 }
 
@@ -258,10 +258,10 @@ static int msr_class_cpu_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_ONLINE:
-               msr_class_device_create(cpu);
+               msr_device_create(cpu);
                break;
        case CPU_DEAD:
-               class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu));
+               device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu));
                break;
        }
        return NOTIFY_OK;
@@ -290,7 +290,7 @@ static int __init msr_init(void)
                goto out_chrdev;
        }
        for_each_online_cpu(i) {
-               err = msr_class_device_create(i);
+               err = msr_device_create(i);
                if (err != 0)
                        goto out_class;
        }
@@ -302,7 +302,7 @@ static int __init msr_init(void)
 out_class:
        i = 0;
        for_each_online_cpu(i)
-               class_device_destroy(msr_class, MKDEV(MSR_MAJOR, i));
+               device_destroy(msr_class, MKDEV(MSR_MAJOR, i));
        class_destroy(msr_class);
 out_chrdev:
        unregister_chrdev(MSR_MAJOR, "cpu/msr");
@@ -314,7 +314,7 @@ static void __exit msr_exit(void)
 {
        int cpu = 0;
        for_each_online_cpu(cpu)
-               class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu));
+               device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu));
        class_destroy(msr_class);
        unregister_chrdev(MSR_MAJOR, "cpu/msr");
        unregister_hotcpu_notifier(&msr_class_cpu_notifier);
index db8e1fcfa047d7e53a5f2f1961adad1ecef4327d..14691cda05c38da33ad2e8b124ea6eada5223790 100644 (file)
@@ -75,7 +75,7 @@
 ** If a device prefetches beyond the end of a valid pdir entry, it will cause
 ** a hard failure, ie. MCA.  Version 3.0 and later of the zx1 LBA should
 ** disconnect on 4k boundaries and prevent such issues.  If the device is
-** particularly agressive, this option will keep the entire pdir valid such
+** particularly aggressive, this option will keep the entire pdir valid such
 ** that prefetching will hit a valid address.  This could severely impact
 ** error containment, and is therefore off by default.  The page that is
 ** used for spill-over is poisoned, so that should help debugging somewhat.
@@ -258,10 +258,10 @@ static u64 prefetch_spill_page;
 
 /*
 ** DMA_CHUNK_SIZE is used by the SCSI mid-layer to break up
-** (or rather not merge) DMA's into managable chunks.
+** (or rather not merge) DMAs into manageable chunks.
 ** On parisc, this is more of the software/tuning constraint
-** rather than the HW. I/O MMU allocation alogorithms can be
-** faster with smaller size is (to some degree).
+** rather than the HW. I/O MMU allocation algorithms can be
+** faster with smaller sizes (to some degree).
 */
 #define DMA_CHUNK_SIZE  (BITS_PER_LONG*iovp_size)
 
index 6d920d4bdc3d4a0c47f5c83b43da1737b8d280bb..c1bc22c6d0d817e019a7022450b00425c52df587 100644 (file)
@@ -565,7 +565,7 @@ config ROMVEC
        depends on ROM
        help
          This is almost always the same as the base of the ROM. Since on all
-         68000 type varients the vectors are at the base of the boot device
+         68000 type variants the vectors are at the base of the boot device
          on system startup.
 
 config ROMVECSIZE
@@ -574,7 +574,7 @@ config ROMVECSIZE
        depends on ROM
        help
          Define the size of the vector region in ROM. For most 68000
-         varients this would be 0x400 bytes in size. Set to 0 if you do
+         variants this would be 0x400 bytes in size. Set to 0 if you do
          not want a vector region at the start of the ROM.
 
 config ROMSTART
index 1443024b1c7c9ba2c688579d426ce18000584ffc..22bb540b5c0533423f213264d7e7429a386aa5ec 100644 (file)
@@ -865,7 +865,7 @@ config MIPS_DISABLE_OBSOLETE_IDE
        bool
 
 #
-# Endianess selection.  Suffiently obscure so many users don't know what to
+# Endianess selection.  Sufficiently obscure so many users don't know what to
 # answer,so we try hard to limit the available choices.  Also the use of a
 # choice statement should be more obvious to the user.
 #
@@ -874,7 +874,7 @@ choice
        help
          Some MIPS machines can be configured for either little or big endian
          byte order. These modes require different kernels and a different
-         Linux distribution.  In general there is one prefered byteorder for a
+         Linux distribution.  In general there is one preferred byteorder for a
          particular system but some systems are just as commonly used in the
          one or the other endianess.
 
index 0673dbedb241e8562db83b8fa69ba5d43eacf473..116d7d3683edb98777398df7d033300a79b0d738 100644 (file)
@@ -425,7 +425,7 @@ config PPC_MAPLE
        default n
        help
           This option enables support for the Maple 970FX Evaluation Board.
-         For more informations, refer to <http://www.970eval.com>
+         For more information, refer to <http://www.970eval.com>
 
 config PPC_PASEMI
        depends on PPC_MULTIPLATFORM && PPC64
index 7edb6b461382b407203b5c1929ae0fd7e4ba2487..edcd5b875b6699e8a3f2f8dc21c63f541d37eae1 100644 (file)
@@ -21,7 +21,7 @@ config MPC834x_SYS
          Be aware that PCI buses can only function when SYS board is plugged
          into the PIB (Platform IO Board) board from Freescale which provide
          3 PCI slots.  The PIBs PCI initialization is the bootloader's
-         responsiblilty.
+         responsibility.
 
 config MPC834x_ITX
        bool "Freescale MPC834x ITX"
@@ -30,7 +30,7 @@ config MPC834x_ITX
          This option enables support for the MPC 834x ITX evaluation board.
 
          Be aware that PCI initialization is the bootloader's
-         responsiblilty.
+         responsibility.
 
 config MPC8360E_PB
        bool "Freescale MPC8360E PB"
index 077711e63104fc28ce53b46add1ae528a60ff996..ef018e25fb07a2462462a7913af412cf3491d791 100644 (file)
@@ -724,7 +724,7 @@ config MPC834x_SYS
          Be aware that PCI buses can only function when SYS board is plugged
          into the PIB (Platform IO Board) board from Freescale which provide
          3 PCI slots.  The PIBs PCI initialization is the bootloader's
-         responsiblilty.
+         responsibility.
 
 config EV64360
        bool "Marvell-EV64360BP"
index 6a461d4caeffc814e2f5968c178edc1de2569bcf..bffc7e176970ffa7eb1e6ad20203fd6862ae866b 100644 (file)
@@ -217,7 +217,7 @@ config SH_SHMIN
        bool "SHMIN"
        select CPU_SUBTYPE_SH7706
        help
-         Select SHMIN if configureing for the SHMIN board
+         Select SHMIN if configuring for the SHMIN board.
 
 config SH_UNKNOWN
        bool "BareCPU"
index 1326f45f31ebf6ce3300c1c438f5ff85b6112f95..4310fc87444e9e703ef7fe0ef4f9b3838fc0ecdb 100644 (file)
@@ -383,7 +383,7 @@ void show_excp_regs(char *from, int trapnr, int signr, struct pt_regs *regs)
 /* ======================================================================= */
 
 /*
-** Depending on <base> scan the MMU, Data or Instrction side
+** Depending on <base> scan the MMU, Data or Instruction side
 ** looking for a valid mapping matching Eaddr & asid.
 ** Return -1 if not found or the TLB id entry otherwise.
 ** Note: it works only for 4k pages!
index 2f96610a83e961fc3e6a539c09aac98e9e39bb56..92a7c8a636d3c8679ec34eab437ab4a8273d55e4 100644 (file)
@@ -212,8 +212,8 @@ config SPARC_LED
        tristate "Sun4m LED driver"
        help
          This driver toggles the front-panel LED on sun4m systems
-         in a user-specifyable manner.  It's state can be probed
-         by reading /proc/led and it's blinking mode can be changed
+         in a user-specifiable manner.  Its state can be probed
+         by reading /proc/led and its blinking mode can be changed
          via writes to /proc/led
 
 source "fs/Kconfig.binfmt"
index 2f880cb167a582f5f10be75d4647facd1f82e274..0cad3546cb8922a013893d516111f9f669115fdb 100644 (file)
@@ -120,7 +120,7 @@ static int winch_thread(void *arg)
        /* These are synchronization calls between various UML threads on the
         * host - since they are not different kernel threads, we cannot use
         * kernel semaphores. We don't use SysV semaphores because they are
-        * persistant. */
+        * persistent. */
        count = os_read_file(pipe_fd, &c, sizeof(c));
        if(count != sizeof(c))
                printk("winch_thread : failed to read synchronization byte, "
index 50b95e4c1425b8ae3950451c146c020da4b0b146..00242111a457e3b461d59e4542bdd86d8501db44 100644 (file)
@@ -1317,7 +1317,7 @@ static void as_exit_queue(elevator_t *e)
 /*
  * initialize elevator private data (as_data).
  */
-static void *as_init_queue(request_queue_t *q, elevator_t *e)
+static void *as_init_queue(request_queue_t *q)
 {
        struct as_data *ad;
 
index 135593c8e45bdee40f97c3e690d47c34e769370a..562ca7cbf858bf93777ef8029414768b170fe6af 100644 (file)
 #include <linux/init.h>
 #include <linux/mutex.h>
 #include <linux/debugfs.h>
+#include <linux/time.h>
 #include <asm/uaccess.h>
 
 static DEFINE_PER_CPU(unsigned long long, blk_trace_cpu_offset) = { 0, };
 static unsigned int blktrace_seq __read_mostly = 1;
 
+/*
+ * Send out a notify message.
+ */
+static inline unsigned int trace_note(struct blk_trace *bt,
+               pid_t pid, int action,
+               const void *data, size_t len)
+{
+       struct blk_io_trace *t;
+       int cpu = smp_processor_id();
+
+       t = relay_reserve(bt->rchan, sizeof(*t) + len);
+       if (t == NULL)
+               return 0;
+
+       t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION;
+       t->time = sched_clock() - per_cpu(blk_trace_cpu_offset, cpu);
+       t->device = bt->dev;
+       t->action = action;
+       t->pid = pid;
+       t->cpu = cpu;
+       t->pdu_len = len;
+       memcpy((void *) t + sizeof(*t), data, len);
+       return blktrace_seq;
+}
+
 /*
  * Send out a notify for this process, if we haven't done so since a trace
  * started
  */
 static void trace_note_tsk(struct blk_trace *bt, struct task_struct *tsk)
 {
-       struct blk_io_trace *t;
+       tsk->btrace_seq = trace_note(bt, tsk->pid,
+                       BLK_TN_PROCESS,
+                       tsk->comm, sizeof(tsk->comm));
+}
 
-       t = relay_reserve(bt->rchan, sizeof(*t) + sizeof(tsk->comm));
-       if (t) {
-               t->magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION;
-               t->device = bt->dev;
-               t->action = BLK_TC_ACT(BLK_TC_NOTIFY);
-               t->pid = tsk->pid;
-               t->cpu = smp_processor_id();
-               t->pdu_len = sizeof(tsk->comm);
-               memcpy((void *) t + sizeof(*t), tsk->comm, t->pdu_len);
-               tsk->btrace_seq = blktrace_seq;
-       }
+static void trace_note_time(struct blk_trace *bt)
+{
+       struct timespec now;
+       unsigned long flags;
+       u32 words[2];
+
+       getnstimeofday(&now);
+       words[0] = now.tv_sec;
+       words[1] = now.tv_nsec;
+
+       local_irq_save(flags);
+       trace_note(bt, 0, BLK_TN_TIMESTAMP, words, sizeof(words));
+       local_irq_restore(flags);
 }
 
 static int act_log_check(struct blk_trace *bt, u32 what, sector_t sector,
@@ -394,6 +425,8 @@ static int blk_trace_startstop(request_queue_t *q, int start)
                        blktrace_seq++;
                        smp_mb();
                        bt->trace_state = Blktrace_running;
+
+                       trace_note_time(bt);
                        ret = 0;
                }
        } else {
index 1d9c3c70a9a05b84469a30f55dfbd369ec239e12..e9019ed39b7352a5416aa38a9a15623be744293d 100644 (file)
@@ -1464,8 +1464,7 @@ cfq_update_io_thinktime(struct cfq_data *cfqd, struct cfq_io_context *cic)
 }
 
 static void
-cfq_update_io_seektime(struct cfq_data *cfqd, struct cfq_io_context *cic,
-                      struct request *rq)
+cfq_update_io_seektime(struct cfq_io_context *cic, struct request *rq)
 {
        sector_t sdist;
        u64 total;
@@ -1617,7 +1616,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
        }
 
        cfq_update_io_thinktime(cfqd, cic);
-       cfq_update_io_seektime(cfqd, cic, rq);
+       cfq_update_io_seektime(cic, rq);
        cfq_update_idle_window(cfqd, cfqq, cic);
 
        cic->last_queue = jiffies;
@@ -1770,7 +1769,7 @@ static int cfq_may_queue(request_queue_t *q, int rw)
 /*
  * queue lock held here
  */
-static void cfq_put_request(request_queue_t *q, struct request *rq)
+static void cfq_put_request(struct request *rq)
 {
        struct cfq_queue *cfqq = RQ_CFQQ(rq);
 
@@ -1951,7 +1950,7 @@ static void cfq_exit_queue(elevator_t *e)
        kfree(cfqd);
 }
 
-static void *cfq_init_queue(request_queue_t *q, elevator_t *e)
+static void *cfq_init_queue(request_queue_t *q)
 {
        struct cfq_data *cfqd;
        int i;
index b7c5b34cb7b43b4688b3f4bbda5951726bbb008a..6d673e938d3eb66c3bb68f0d5f7975e88487fd77 100644 (file)
@@ -356,7 +356,7 @@ static void deadline_exit_queue(elevator_t *e)
 /*
  * initialize elevator private data (deadline_data).
  */
-static void *deadline_init_queue(request_queue_t *q, elevator_t *e)
+static void *deadline_init_queue(request_queue_t *q)
 {
        struct deadline_data *dd;
 
index 8ccd163254b8acf1469628e432308ab73cedd97b..c0063f345c5d620320cd82438394eefe71b442dc 100644 (file)
@@ -129,7 +129,7 @@ static struct elevator_type *elevator_get(const char *name)
 
 static void *elevator_init_queue(request_queue_t *q, struct elevator_queue *eq)
 {
-       return eq->ops->elevator_init_fn(q, eq);
+       return eq->ops->elevator_init_fn(q);
 }
 
 static void elevator_attach(request_queue_t *q, struct elevator_queue *eq,
@@ -810,7 +810,7 @@ void elv_put_request(request_queue_t *q, struct request *rq)
        elevator_t *e = q->elevator;
 
        if (e->ops->elevator_put_req_fn)
-               e->ops->elevator_put_req_fn(q, rq);
+               e->ops->elevator_put_req_fn(rq);
 }
 
 int elv_may_queue(request_queue_t *q, int rw)
index 9eaee66405353b6705c438c5aa8a5e9db7776f90..0f82e12f7b678553b51189374bfb562c676de919 100644 (file)
@@ -2322,6 +2322,84 @@ void blk_insert_request(request_queue_t *q, struct request *rq,
 
 EXPORT_SYMBOL(blk_insert_request);
 
+static int __blk_rq_unmap_user(struct bio *bio)
+{
+       int ret = 0;
+
+       if (bio) {
+               if (bio_flagged(bio, BIO_USER_MAPPED))
+                       bio_unmap_user(bio);
+               else
+                       ret = bio_uncopy_user(bio);
+       }
+
+       return ret;
+}
+
+static int __blk_rq_map_user(request_queue_t *q, struct request *rq,
+                            void __user *ubuf, unsigned int len)
+{
+       unsigned long uaddr;
+       struct bio *bio, *orig_bio;
+       int reading, ret;
+
+       reading = rq_data_dir(rq) == READ;
+
+       /*
+        * if alignment requirement is satisfied, map in user pages for
+        * direct dma. else, set up kernel bounce buffers
+        */
+       uaddr = (unsigned long) ubuf;
+       if (!(uaddr & queue_dma_alignment(q)) && !(len & queue_dma_alignment(q)))
+               bio = bio_map_user(q, NULL, uaddr, len, reading);
+       else
+               bio = bio_copy_user(q, uaddr, len, reading);
+
+       if (IS_ERR(bio)) {
+               return PTR_ERR(bio);
+       }
+
+       orig_bio = bio;
+       blk_queue_bounce(q, &bio);
+       /*
+        * We link the bounce buffer in and could have to traverse it
+        * later so we have to get a ref to prevent it from being freed
+        */
+       bio_get(bio);
+
+       /*
+        * for most (all? don't know of any) queues we could
+        * skip grabbing the queue lock here. only drivers with
+        * funky private ->back_merge_fn() function could be
+        * problematic.
+        */
+       spin_lock_irq(q->queue_lock);
+       if (!rq->bio)
+               blk_rq_bio_prep(q, rq, bio);
+       else if (!q->back_merge_fn(q, rq, bio)) {
+               ret = -EINVAL;
+               spin_unlock_irq(q->queue_lock);
+               goto unmap_bio;
+       } else {
+               rq->biotail->bi_next = bio;
+               rq->biotail = bio;
+
+               rq->nr_sectors += bio_sectors(bio);
+               rq->hard_nr_sectors = rq->nr_sectors;
+               rq->data_len += bio->bi_size;
+       }
+       spin_unlock_irq(q->queue_lock);
+
+       return bio->bi_size;
+
+unmap_bio:
+       /* if it was boucned we must call the end io function */
+       bio_endio(bio, bio->bi_size, 0);
+       __blk_rq_unmap_user(orig_bio);
+       bio_put(bio);
+       return ret;
+}
+
 /**
  * blk_rq_map_user - map user data to a request, for REQ_BLOCK_PC usage
  * @q:         request queue where request should be inserted
@@ -2343,42 +2421,44 @@ EXPORT_SYMBOL(blk_insert_request);
  *    unmapping.
  */
 int blk_rq_map_user(request_queue_t *q, struct request *rq, void __user *ubuf,
-                   unsigned int len)
+                   unsigned long len)
 {
-       unsigned long uaddr;
-       struct bio *bio;
-       int reading;
+       unsigned long bytes_read = 0;
+       int ret;
 
        if (len > (q->max_hw_sectors << 9))
                return -EINVAL;
        if (!len || !ubuf)
                return -EINVAL;
 
-       reading = rq_data_dir(rq) == READ;
+       while (bytes_read != len) {
+               unsigned long map_len, end, start;
 
-       /*
-        * if alignment requirement is satisfied, map in user pages for
-        * direct dma. else, set up kernel bounce buffers
-        */
-       uaddr = (unsigned long) ubuf;
-       if (!(uaddr & queue_dma_alignment(q)) && !(len & queue_dma_alignment(q)))
-               bio = bio_map_user(q, NULL, uaddr, len, reading);
-       else
-               bio = bio_copy_user(q, uaddr, len, reading);
+               map_len = min_t(unsigned long, len - bytes_read, BIO_MAX_SIZE);
+               end = ((unsigned long)ubuf + map_len + PAGE_SIZE - 1)
+                                                               >> PAGE_SHIFT;
+               start = (unsigned long)ubuf >> PAGE_SHIFT;
 
-       if (!IS_ERR(bio)) {
-               rq->bio = rq->biotail = bio;
-               blk_rq_bio_prep(q, rq, bio);
+               /*
+                * A bad offset could cause us to require BIO_MAX_PAGES + 1
+                * pages. If this happens we just lower the requested
+                * mapping len by a page so that we can fit
+                */
+               if (end - start > BIO_MAX_PAGES)
+                       map_len -= PAGE_SIZE;
 
-               rq->buffer = rq->data = NULL;
-               rq->data_len = len;
-               return 0;
+               ret = __blk_rq_map_user(q, rq, ubuf, map_len);
+               if (ret < 0)
+                       goto unmap_rq;
+               bytes_read += ret;
+               ubuf += ret;
        }
 
-       /*
-        * bio is the err-ptr
-        */
-       return PTR_ERR(bio);
+       rq->buffer = rq->data = NULL;
+       return 0;
+unmap_rq:
+       blk_rq_unmap_user(rq);
+       return ret;
 }
 
 EXPORT_SYMBOL(blk_rq_map_user);
@@ -2404,7 +2484,7 @@ EXPORT_SYMBOL(blk_rq_map_user);
  *    unmapping.
  */
 int blk_rq_map_user_iov(request_queue_t *q, struct request *rq,
-                       struct sg_iovec *iov, int iov_count)
+                       struct sg_iovec *iov, int iov_count, unsigned int len)
 {
        struct bio *bio;
 
@@ -2418,10 +2498,15 @@ int blk_rq_map_user_iov(request_queue_t *q, struct request *rq,
        if (IS_ERR(bio))
                return PTR_ERR(bio);
 
-       rq->bio = rq->biotail = bio;
+       if (bio->bi_size != len) {
+               bio_endio(bio, bio->bi_size, 0);
+               bio_unmap_user(bio);
+               return -EINVAL;
+       }
+
+       bio_get(bio);
        blk_rq_bio_prep(q, rq, bio);
        rq->buffer = rq->data = NULL;
-       rq->data_len = bio->bi_size;
        return 0;
 }
 
@@ -2429,23 +2514,26 @@ EXPORT_SYMBOL(blk_rq_map_user_iov);
 
 /**
  * blk_rq_unmap_user - unmap a request with user data
- * @bio:       bio to be unmapped
- * @ulen:      length of user buffer
+ * @rq:                rq to be unmapped
  *
  * Description:
- *    Unmap a bio previously mapped by blk_rq_map_user().
+ *    Unmap a rq previously mapped by blk_rq_map_user().
+ *    rq->bio must be set to the original head of the request.
  */
-int blk_rq_unmap_user(struct bio *bio, unsigned int ulen)
+int blk_rq_unmap_user(struct request *rq)
 {
-       int ret = 0;
+       struct bio *bio, *mapped_bio;
 
-       if (bio) {
-               if (bio_flagged(bio, BIO_USER_MAPPED))
-                       bio_unmap_user(bio);
+       while ((bio = rq->bio)) {
+               if (bio_flagged(bio, BIO_BOUNCED))
+                       mapped_bio = bio->bi_private;
                else
-                       ret = bio_uncopy_user(bio);
-       }
+                       mapped_bio = bio;
 
+               __blk_rq_unmap_user(mapped_bio);
+               rq->bio = bio->bi_next;
+               bio_put(bio);
+       }
        return 0;
 }
 
@@ -2476,11 +2564,8 @@ int blk_rq_map_kern(request_queue_t *q, struct request *rq, void *kbuf,
        if (rq_data_dir(rq) == WRITE)
                bio->bi_rw |= (1 << BIO_RW);
 
-       rq->bio = rq->biotail = bio;
        blk_rq_bio_prep(q, rq, bio);
-
        rq->buffer = rq->data = NULL;
-       rq->data_len = len;
        return 0;
 }
 
@@ -3495,6 +3580,7 @@ void blk_rq_bio_prep(request_queue_t *q, struct request *rq, struct bio *bio)
        rq->hard_cur_sectors = rq->current_nr_sectors;
        rq->hard_nr_sectors = rq->nr_sectors = bio_sectors(bio);
        rq->buffer = bio_data(bio);
+       rq->data_len = bio->bi_size;
 
        rq->bio = rq->biotail = bio;
 }
index 79af431794213867e5ac1c457103d62b0d74cb43..1c3de2b9a6b59c0d6938b082bfb48fa6085d877d 100644 (file)
@@ -65,7 +65,7 @@ noop_latter_request(request_queue_t *q, struct request *rq)
        return list_entry(rq->queuelist.next, struct request, queuelist);
 }
 
-static void *noop_init_queue(request_queue_t *q, elevator_t *e)
+static void *noop_init_queue(request_queue_t *q)
 {
        struct noop_data *nd;
 
index e55a756214375577ffa942dbc239fe79e87985fe..5493c2fbbab177335814a24362b95763eb5dc820 100644 (file)
@@ -226,7 +226,6 @@ static int sg_io(struct file *file, request_queue_t *q,
        unsigned long start_time;
        int writing = 0, ret = 0;
        struct request *rq;
-       struct bio *bio;
        char sense[SCSI_SENSE_BUFFERSIZE];
        unsigned char cmd[BLK_MAX_CDB];
 
@@ -258,30 +257,6 @@ static int sg_io(struct file *file, request_queue_t *q,
        if (!rq)
                return -ENOMEM;
 
-       if (hdr->iovec_count) {
-               const int size = sizeof(struct sg_iovec) * hdr->iovec_count;
-               struct sg_iovec *iov;
-
-               iov = kmalloc(size, GFP_KERNEL);
-               if (!iov) {
-                       ret = -ENOMEM;
-                       goto out;
-               }
-
-               if (copy_from_user(iov, hdr->dxferp, size)) {
-                       kfree(iov);
-                       ret = -EFAULT;
-                       goto out;
-               }
-
-               ret = blk_rq_map_user_iov(q, rq, iov, hdr->iovec_count);
-               kfree(iov);
-       } else if (hdr->dxfer_len)
-               ret = blk_rq_map_user(q, rq, hdr->dxferp, hdr->dxfer_len);
-
-       if (ret)
-               goto out;
-
        /*
         * fill in request structure
         */
@@ -294,7 +269,6 @@ static int sg_io(struct file *file, request_queue_t *q,
        rq->sense_len = 0;
 
        rq->cmd_type = REQ_TYPE_BLOCK_PC;
-       bio = rq->bio;
 
        /*
         * bounce this after holding a reference to the original bio, it's
@@ -309,6 +283,31 @@ static int sg_io(struct file *file, request_queue_t *q,
        if (!rq->timeout)
                rq->timeout = BLK_DEFAULT_TIMEOUT;
 
+       if (hdr->iovec_count) {
+               const int size = sizeof(struct sg_iovec) * hdr->iovec_count;
+               struct sg_iovec *iov;
+
+               iov = kmalloc(size, GFP_KERNEL);
+               if (!iov) {
+                       ret = -ENOMEM;
+                       goto out;
+               }
+
+               if (copy_from_user(iov, hdr->dxferp, size)) {
+                       kfree(iov);
+                       ret = -EFAULT;
+                       goto out;
+               }
+
+               ret = blk_rq_map_user_iov(q, rq, iov, hdr->iovec_count,
+                                         hdr->dxfer_len);
+               kfree(iov);
+       } else if (hdr->dxfer_len)
+               ret = blk_rq_map_user(q, rq, hdr->dxferp, hdr->dxfer_len);
+
+       if (ret)
+               goto out;
+
        rq->retries = 0;
 
        start_time = jiffies;
@@ -339,7 +338,7 @@ static int sg_io(struct file *file, request_queue_t *q,
                        hdr->sb_len_wr = len;
        }
 
-       if (blk_rq_unmap_user(bio, hdr->dxfer_len))
+       if (blk_rq_unmap_user(rq))
                ret = -EFAULT;
 
        /* may not have succeeded, but output values written to control
index 10f160dc75b1cb5370063bcf96a6c738745d028c..a2f46d587d55d77310c96694b706a7d6b18b4643 100644 (file)
@@ -267,9 +267,9 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle)
 {
        acpi_status status;
 
-       if (dev->firmware_data) {
+       if (dev->archdata.acpi_handle) {
                printk(KERN_WARNING PREFIX
-                      "Drivers changed 'firmware_data' for %s\n", dev->bus_id);
+                      "Drivers changed 'acpi_handle' for %s\n", dev->bus_id);
                return -EINVAL;
        }
        get_device(dev);
@@ -278,25 +278,26 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle)
                put_device(dev);
                return -EINVAL;
        }
-       dev->firmware_data = handle;
+       dev->archdata.acpi_handle = handle;
 
        return 0;
 }
 
 static int acpi_unbind_one(struct device *dev)
 {
-       if (!dev->firmware_data)
+       if (!dev->archdata.acpi_handle)
                return 0;
-       if (dev == acpi_get_physical_device(dev->firmware_data)) {
+       if (dev == acpi_get_physical_device(dev->archdata.acpi_handle)) {
                /* acpi_get_physical_device increase refcnt by one */
                put_device(dev);
-               acpi_detach_data(dev->firmware_data, acpi_glue_data_handler);
-               dev->firmware_data = NULL;
+               acpi_detach_data(dev->archdata.acpi_handle,
+                                acpi_glue_data_handler);
+               dev->archdata.acpi_handle = NULL;
                /* acpi_bind_one increase refcnt by one */
                put_device(dev);
        } else {
                printk(KERN_ERR PREFIX
-                      "Oops, 'firmware_data' corrupt for %s\n", dev->bus_id);
+                      "Oops, 'acpi_handle' corrupt for %s\n", dev->bus_id);
        }
        return 0;
 }
@@ -328,7 +329,8 @@ static int acpi_platform_notify(struct device *dev)
        if (!ret) {
                struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 
-               acpi_get_name(dev->firmware_data, ACPI_FULL_PATHNAME, &buffer);
+               acpi_get_name(dev->archdata.acpi_handle,
+                             ACPI_FULL_PATHNAME, &buffer);
                DBG("Device %s -> %s\n", dev->bus_id, (char *)buffer.pointer);
                kfree(buffer.pointer);
        } else
index 9ed1c60048f03002cd4d5df7d835a7fe28ad274a..bb7ef570514cd660e2a200af09647bbebd97a416 100644 (file)
@@ -305,7 +305,7 @@ static void clear_lockup (struct atm_vcc *vcc, IADEV *dev) {
 **  |  R | NZ |  5-bit exponent  |        9-bit mantissa         |
 **  +----+----+------------------+-------------------------------+
 ** 
-**    R = reserverd (written as 0)
+**    R = reserved (written as 0)
 **    NZ = 0 if 0 cells/sec; 1 otherwise
 **
 **    if NZ = 1, rate = 1.mmmmmmmmm x 2^(eeeee) cells/sec
index 7d8a7ce73fb314a22d8d2ec51c8717b2ab10cc0b..472810f8e6e7332f13127b31a299f5712e4ffbc9 100644 (file)
@@ -355,6 +355,21 @@ static void device_remove_attrs(struct bus_type * bus, struct device * dev)
        }
 }
 
+#ifdef CONFIG_SYSFS_DEPRECATED
+static int make_deprecated_bus_links(struct device *dev)
+{
+       return sysfs_create_link(&dev->kobj,
+                                &dev->bus->subsys.kset.kobj, "bus");
+}
+
+static void remove_deprecated_bus_links(struct device *dev)
+{
+       sysfs_remove_link(&dev->kobj, "bus");
+}
+#else
+static inline int make_deprecated_bus_links(struct device *dev) { return 0; }
+static inline void remove_deprecated_bus_links(struct device *dev) { }
+#endif
 
 /**
  *     bus_add_device - add device to bus
@@ -381,8 +396,7 @@ int bus_add_device(struct device * dev)
                                &dev->bus->subsys.kset.kobj, "subsystem");
                if (error)
                        goto out_subsys;
-               error = sysfs_create_link(&dev->kobj,
-                               &dev->bus->subsys.kset.kobj, "bus");
+               error = make_deprecated_bus_links(dev);
                if (error)
                        goto out_deprecated;
        }
@@ -436,7 +450,7 @@ void bus_remove_device(struct device * dev)
 {
        if (dev->bus) {
                sysfs_remove_link(&dev->kobj, "subsystem");
-               sysfs_remove_link(&dev->kobj, "bus");
+               remove_deprecated_bus_links(dev);
                sysfs_remove_link(&dev->bus->devices.kobj, dev->bus_id);
                device_remove_attrs(dev->bus, dev);
                if (dev->is_registered) {
@@ -724,6 +738,8 @@ int bus_register(struct bus_type * bus)
 {
        int retval;
 
+       BLOCKING_INIT_NOTIFIER_HEAD(&bus->bus_notifier);
+
        retval = kobject_set_name(&bus->subsys.kset.kobj, "%s", bus->name);
        if (retval)
                goto out;
@@ -782,6 +798,18 @@ void bus_unregister(struct bus_type * bus)
        subsystem_unregister(&bus->subsys);
 }
 
+int bus_register_notifier(struct bus_type *bus, struct notifier_block *nb)
+{
+       return blocking_notifier_chain_register(&bus->bus_notifier, nb);
+}
+EXPORT_SYMBOL_GPL(bus_register_notifier);
+
+int bus_unregister_notifier(struct bus_type *bus, struct notifier_block *nb)
+{
+       return blocking_notifier_chain_unregister(&bus->bus_notifier, nb);
+}
+EXPORT_SYMBOL_GPL(bus_unregister_notifier);
+
 int __init buses_init(void)
 {
        return subsystem_register(&bus_subsys);
index 0ff267a248dba8ff5e215a380a54ea0f4221c7ce..f098881f45b28129ec58aeae78e761fc4768e9bd 100644 (file)
@@ -352,6 +352,92 @@ static const char *class_uevent_name(struct kset *kset, struct kobject *kobj)
        return class_dev->class->name;
 }
 
+#ifdef CONFIG_SYSFS_DEPRECATED
+char *make_class_name(const char *name, struct kobject *kobj)
+{
+       char *class_name;
+       int size;
+
+       size = strlen(name) + strlen(kobject_name(kobj)) + 2;
+
+       class_name = kmalloc(size, GFP_KERNEL);
+       if (!class_name)
+               return ERR_PTR(-ENOMEM);
+
+       strcpy(class_name, name);
+       strcat(class_name, ":");
+       strcat(class_name, kobject_name(kobj));
+       return class_name;
+}
+
+static int deprecated_class_uevent(char **envp, int num_envp, int *cur_index,
+                                  char *buffer, int buffer_size,
+                                  int *cur_len,
+                                  struct class_device *class_dev)
+{
+       struct device *dev = class_dev->dev;
+       char *path;
+
+       if (!dev)
+               return 0;
+
+       /* add device, backing this class device (deprecated) */
+       path = kobject_get_path(&dev->kobj, GFP_KERNEL);
+
+       add_uevent_var(envp, num_envp, cur_index, buffer, buffer_size,
+                      cur_len, "PHYSDEVPATH=%s", path);
+       kfree(path);
+
+       if (dev->bus)
+               add_uevent_var(envp, num_envp, cur_index,
+                              buffer, buffer_size, cur_len,
+                              "PHYSDEVBUS=%s", dev->bus->name);
+
+       if (dev->driver)
+               add_uevent_var(envp, num_envp, cur_index,
+                              buffer, buffer_size, cur_len,
+                              "PHYSDEVDRIVER=%s", dev->driver->name);
+       return 0;
+}
+
+static int make_deprecated_class_device_links(struct class_device *class_dev)
+{
+       char *class_name;
+       int error;
+
+       if (!class_dev->dev)
+               return 0;
+
+       class_name = make_class_name(class_dev->class->name, &class_dev->kobj);
+       error = sysfs_create_link(&class_dev->dev->kobj, &class_dev->kobj,
+                                 class_name);
+       kfree(class_name);
+       return error;
+}
+
+static void remove_deprecated_class_device_links(struct class_device *class_dev)
+{
+       char *class_name;
+
+       if (!class_dev->dev)
+               return;
+
+       class_name = make_class_name(class_dev->class->name, &class_dev->kobj);
+       sysfs_remove_link(&class_dev->dev->kobj, class_name);
+       kfree(class_name);
+}
+#else
+static inline int deprecated_class_uevent(char **envp, int num_envp,
+                                         int *cur_index, char *buffer,
+                                         int buffer_size, int *cur_len,
+                                         struct class_device *class_dev)
+{ return 0; }
+static inline int make_deprecated_class_device_links(struct class_device *cd)
+{ return 0; }
+static void remove_deprecated_class_device_links(struct class_device *cd)
+{ }
+#endif
+
 static int class_uevent(struct kset *kset, struct kobject *kobj, char **envp,
                         int num_envp, char *buffer, int buffer_size)
 {
@@ -362,25 +448,8 @@ static int class_uevent(struct kset *kset, struct kobject *kobj, char **envp,
 
        pr_debug("%s - name = %s\n", __FUNCTION__, class_dev->class_id);
 
-       if (class_dev->dev) {
-               /* add device, backing this class device (deprecated) */
-               struct device *dev = class_dev->dev;
-               char *path = kobject_get_path(&dev->kobj, GFP_KERNEL);
-
-               add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
-                              &length, "PHYSDEVPATH=%s", path);
-               kfree(path);
-
-               if (dev->bus)
-                       add_uevent_var(envp, num_envp, &i,
-                                      buffer, buffer_size, &length,
-                                      "PHYSDEVBUS=%s", dev->bus->name);
-
-               if (dev->driver)
-                       add_uevent_var(envp, num_envp, &i,
-                                      buffer, buffer_size, &length,
-                                      "PHYSDEVDRIVER=%s", dev->driver->name);
-       }
+       deprecated_class_uevent(envp, num_envp, &i, buffer, buffer_size,
+                               &length, class_dev);
 
        if (MAJOR(class_dev->devt)) {
                add_uevent_var(envp, num_envp, &i,
@@ -506,29 +575,11 @@ void class_device_initialize(struct class_device *class_dev)
        INIT_LIST_HEAD(&class_dev->node);
 }
 
-char *make_class_name(const char *name, struct kobject *kobj)
-{
-       char *class_name;
-       int size;
-
-       size = strlen(name) + strlen(kobject_name(kobj)) + 2;
-
-       class_name = kmalloc(size, GFP_KERNEL);
-       if (!class_name)
-               return ERR_PTR(-ENOMEM);
-
-       strcpy(class_name, name);
-       strcat(class_name, ":");
-       strcat(class_name, kobject_name(kobj));
-       return class_name;
-}
-
 int class_device_add(struct class_device *class_dev)
 {
        struct class *parent_class = NULL;
        struct class_device *parent_class_dev = NULL;
        struct class_interface *class_intf;
-       char *class_name = NULL;
        int error = -EINVAL;
 
        class_dev = class_device_get(class_dev);
@@ -599,19 +650,17 @@ int class_device_add(struct class_device *class_dev)
                goto out5;
 
        if (class_dev->dev) {
-               class_name = make_class_name(class_dev->class->name,
-                                            &class_dev->kobj);
                error = sysfs_create_link(&class_dev->kobj,
                                          &class_dev->dev->kobj, "device");
                if (error)
                        goto out6;
-               error = sysfs_create_link(&class_dev->dev->kobj, &class_dev->kobj,
-                                         class_name);
-               if (error)
-                       goto out7;
        }
 
        error = class_device_add_groups(class_dev);
+       if (error)
+               goto out7;
+
+       error = make_deprecated_class_device_links(class_dev);
        if (error)
                goto out8;
 
@@ -629,8 +678,7 @@ int class_device_add(struct class_device *class_dev)
        goto out1;
 
  out8:
-       if (class_dev->dev)
-               sysfs_remove_link(&class_dev->kobj, class_name);
+       class_device_remove_groups(class_dev);
  out7:
        if (class_dev->dev)
                sysfs_remove_link(&class_dev->kobj, "device");
@@ -649,7 +697,6 @@ int class_device_add(struct class_device *class_dev)
        class_put(parent_class);
  out1:
        class_device_put(class_dev);
-       kfree(class_name);
        return error;
 }
 
@@ -726,7 +773,6 @@ void class_device_del(struct class_device *class_dev)
        struct class *parent_class = class_dev->class;
        struct class_device *parent_device = class_dev->parent;
        struct class_interface *class_intf;
-       char *class_name = NULL;
 
        if (parent_class) {
                down(&parent_class->sem);
@@ -738,10 +784,8 @@ void class_device_del(struct class_device *class_dev)
        }
 
        if (class_dev->dev) {
-               class_name = make_class_name(class_dev->class->name,
-                                            &class_dev->kobj);
+               remove_deprecated_class_device_links(class_dev);
                sysfs_remove_link(&class_dev->kobj, "device");
-               sysfs_remove_link(&class_dev->dev->kobj, class_name);
        }
        sysfs_remove_link(&class_dev->kobj, "subsystem");
        class_device_remove_file(class_dev, &class_dev->uevent_attr);
@@ -755,7 +799,6 @@ void class_device_del(struct class_device *class_dev)
 
        class_device_put(parent_device);
        class_put(parent_class);
-       kfree(class_name);
 }
 
 void class_device_unregister(struct class_device *class_dev)
@@ -804,14 +847,17 @@ int class_device_rename(struct class_device *class_dev, char *new_name)
        pr_debug("CLASS: renaming '%s' to '%s'\n", class_dev->class_id,
                 new_name);
 
+#ifdef CONFIG_SYSFS_DEPRECATED
        if (class_dev->dev)
                old_class_name = make_class_name(class_dev->class->name,
                                                 &class_dev->kobj);
+#endif
 
        strlcpy(class_dev->class_id, new_name, KOBJ_NAME_LEN);
 
        error = kobject_rename(&class_dev->kobj, new_name);
 
+#ifdef CONFIG_SYSFS_DEPRECATED
        if (class_dev->dev) {
                new_class_name = make_class_name(class_dev->class->name,
                                                 &class_dev->kobj);
@@ -819,6 +865,7 @@ int class_device_rename(struct class_device *class_dev, char *new_name)
                                  new_class_name);
                sysfs_remove_link(&class_dev->dev->kobj, old_class_name);
        }
+#endif
        class_device_put(class_dev);
 
        kfree(old_class_name);
@@ -893,23 +940,6 @@ void class_interface_unregister(struct class_interface *class_intf)
        class_put(parent);
 }
 
-int virtual_device_parent(struct device *dev)
-{
-       if (!dev->class)
-               return -ENODEV;
-
-       if (!dev->class->virtual_dir) {
-               static struct kobject *virtual_dir = NULL;
-
-               if (!virtual_dir)
-                       virtual_dir = kobject_add_dir(&devices_subsys.kset.kobj, "virtual");
-               dev->class->virtual_dir = kobject_add_dir(virtual_dir, dev->class->name);
-       }
-
-       dev->kobj.parent = dev->class->virtual_dir;
-       return 0;
-}
-
 int __init classes_init(void)
 {
        int retval;
index 002fde46d38d71737ae07f6d905f8f2b5a8e4603..e4b530ef757de101329753e37cc1db524dce45c2 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/kdev_t.h>
+#include <linux/notifier.h>
 
 #include <asm/semaphore.h>
 
@@ -153,20 +154,24 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, char **envp,
                               "MINOR=%u", MINOR(dev->devt));
        }
 
+#ifdef CONFIG_SYSFS_DEPRECATED
        /* add bus name (same as SUBSYSTEM, deprecated) */
        if (dev->bus)
                add_uevent_var(envp, num_envp, &i,
                               buffer, buffer_size, &length,
                               "PHYSDEVBUS=%s", dev->bus->name);
+#endif
 
        /* add driver name (PHYSDEV* values are deprecated)*/
        if (dev->driver) {
                add_uevent_var(envp, num_envp, &i,
                               buffer, buffer_size, &length,
                               "DRIVER=%s", dev->driver->name);
+#ifdef CONFIG_SYSFS_DEPRECATED
                add_uevent_var(envp, num_envp, &i,
                               buffer, buffer_size, &length,
                               "PHYSDEVDRIVER=%s", dev->driver->name);
+#endif
        }
 
        /* terminate, set to next free slot, shrink available space */
@@ -383,6 +388,52 @@ void device_initialize(struct device *dev)
        device_init_wakeup(dev, 0);
 }
 
+#ifdef CONFIG_SYSFS_DEPRECATED
+static int setup_parent(struct device *dev, struct device *parent)
+{
+       /* Set the parent to the class, not the parent device */
+       /* this keeps sysfs from having a symlink to make old udevs happy */
+       if (dev->class)
+               dev->kobj.parent = &dev->class->subsys.kset.kobj;
+       else if (parent)
+               dev->kobj.parent = &parent->kobj;
+
+       return 0;
+}
+#else
+static int virtual_device_parent(struct device *dev)
+{
+       if (!dev->class)
+               return -ENODEV;
+
+       if (!dev->class->virtual_dir) {
+               static struct kobject *virtual_dir = NULL;
+
+               if (!virtual_dir)
+                       virtual_dir = kobject_add_dir(&devices_subsys.kset.kobj, "virtual");
+               dev->class->virtual_dir = kobject_add_dir(virtual_dir, dev->class->name);
+       }
+
+       dev->kobj.parent = dev->class->virtual_dir;
+       return 0;
+}
+
+static int setup_parent(struct device *dev, struct device *parent)
+{
+       int error;
+
+       /* if this is a class device, and has no parent, create one */
+       if ((dev->class) && (parent == NULL)) {
+               error = virtual_device_parent(dev);
+               if (error)
+                       return error;
+       } else if (parent)
+               dev->kobj.parent = &parent->kobj;
+
+       return 0;
+}
+#endif
+
 /**
  *     device_add - add device to device hierarchy.
  *     @dev:   device.
@@ -405,29 +456,29 @@ int device_add(struct device *dev)
        if (!dev || !strlen(dev->bus_id))
                goto Error;
 
-       /* if this is a class device, and has no parent, create one */
-       if ((dev->class) && (dev->parent == NULL)) {
-               error = virtual_device_parent(dev);
-               if (error)
-                       goto Error;
-       }
+       pr_debug("DEV: registering device: ID = '%s'\n", dev->bus_id);
 
        parent = get_device(dev->parent);
 
-       pr_debug("DEV: registering device: ID = '%s'\n", dev->bus_id);
+       error = setup_parent(dev, parent);
+       if (error)
+               goto Error;
 
        /* first, register with generic layer. */
        kobject_set_name(&dev->kobj, "%s", dev->bus_id);
-       if (parent)
-               dev->kobj.parent = &parent->kobj;
-
-       if ((error = kobject_add(&dev->kobj)))
+       error = kobject_add(&dev->kobj);
+       if (error)
                goto Error;
 
        /* notify platform of device entry */
        if (platform_notify)
                platform_notify(dev);
 
+       /* notify clients of device entry (new way) */
+       if (dev->bus)
+               blocking_notifier_call_chain(&dev->bus->bus_notifier,
+                                            BUS_NOTIFY_ADD_DEVICE, dev);
+
        dev->uevent_attr.attr.name = "uevent";
        dev->uevent_attr.attr.mode = S_IWUSR;
        if (dev->driver)
@@ -461,13 +512,18 @@ int device_add(struct device *dev)
        if (dev->class) {
                sysfs_create_link(&dev->kobj, &dev->class->subsys.kset.kobj,
                                  "subsystem");
-               sysfs_create_link(&dev->class->subsys.kset.kobj, &dev->kobj,
-                                 dev->bus_id);
+               /* If this is not a "fake" compatible device, then create the
+                * symlink from the class to the device. */
+               if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
+                       sysfs_create_link(&dev->class->subsys.kset.kobj,
+                                         &dev->kobj, dev->bus_id);
+#ifdef CONFIG_SYSFS_DEPRECATED
                if (parent) {
                        sysfs_create_link(&dev->kobj, &dev->parent->kobj, "device");
                        class_name = make_class_name(dev->class->name, &dev->kobj);
                        sysfs_create_link(&dev->parent->kobj, &dev->kobj, class_name);
                }
+#endif
        }
 
        if ((error = device_add_attrs(dev)))
@@ -504,6 +560,9 @@ int device_add(struct device *dev)
  BusError:
        device_pm_remove(dev);
  PMError:
+       if (dev->bus)
+               blocking_notifier_call_chain(&dev->bus->bus_notifier,
+                                            BUS_NOTIFY_DEL_DEVICE, dev);
        device_remove_groups(dev);
  GroupError:
        device_remove_attrs(dev);
@@ -586,7 +645,6 @@ void put_device(struct device * dev)
 void device_del(struct device * dev)
 {
        struct device * parent = dev->parent;
-       char *class_name = NULL;
        struct class_interface *class_intf;
 
        if (parent)
@@ -597,13 +655,21 @@ void device_del(struct device * dev)
        }
        if (dev->class) {
                sysfs_remove_link(&dev->kobj, "subsystem");
-               sysfs_remove_link(&dev->class->subsys.kset.kobj, dev->bus_id);
-               class_name = make_class_name(dev->class->name, &dev->kobj);
+               /* If this is not a "fake" compatible device, remove the
+                * symlink from the class to the device. */
+               if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
+                       sysfs_remove_link(&dev->class->subsys.kset.kobj,
+                                         dev->bus_id);
+#ifdef CONFIG_SYSFS_DEPRECATED
                if (parent) {
-                       sysfs_remove_link(&dev->kobj, "device");
+                       char *class_name = make_class_name(dev->class->name,
+                                                          &dev->kobj);
                        sysfs_remove_link(&dev->parent->kobj, class_name);
+                       kfree(class_name);
+                       sysfs_remove_link(&dev->kobj, "device");
                }
-               kfree(class_name);
+#endif
+
                down(&dev->class->sem);
                /* notify any interfaces that the device is now gone */
                list_for_each_entry(class_intf, &dev->class->interfaces, node)
@@ -616,13 +682,16 @@ void device_del(struct device * dev)
        device_remove_file(dev, &dev->uevent_attr);
        device_remove_groups(dev);
        device_remove_attrs(dev);
+       bus_remove_device(dev);
 
        /* Notify the platform of the removal, in case they
         * need to do anything...
         */
        if (platform_notify_remove)
                platform_notify_remove(dev);
-       bus_remove_device(dev);
+       if (dev->bus)
+               blocking_notifier_call_chain(&dev->bus->bus_notifier,
+                                            BUS_NOTIFY_DEL_DEVICE, dev);
        device_pm_remove(dev);
        kobject_uevent(&dev->kobj, KOBJ_REMOVE);
        kobject_del(&dev->kobj);
@@ -681,12 +750,45 @@ int device_for_each_child(struct device * parent, void * data,
        return error;
 }
 
+/**
+ * device_find_child - device iterator for locating a particular device.
+ * @parent: parent struct device
+ * @data: Data to pass to match function
+ * @match: Callback function to check device
+ *
+ * This is similar to the device_for_each_child() function above, but it
+ * returns a reference to a device that is 'found' for later use, as
+ * determined by the @match callback.
+ *
+ * The callback should return 0 if the device doesn't match and non-zero
+ * if it does.  If the callback returns non-zero and a reference to the
+ * current device can be obtained, this function will return to the caller
+ * and not iterate over any more devices.
+ */
+struct device * device_find_child(struct device *parent, void *data,
+                                 int (*match)(struct device *, void *))
+{
+       struct klist_iter i;
+       struct device *child;
+
+       if (!parent)
+               return NULL;
+
+       klist_iter_init(&parent->klist_children, &i);
+       while ((child = next_device(&i)))
+               if (match(child, data) && get_device(child))
+                       break;
+       klist_iter_exit(&i);
+       return child;
+}
+
 int __init devices_init(void)
 {
        return subsystem_register(&devices_subsys);
 }
 
 EXPORT_SYMBOL_GPL(device_for_each_child);
+EXPORT_SYMBOL_GPL(device_find_child);
 
 EXPORT_SYMBOL_GPL(device_initialize);
 EXPORT_SYMBOL_GPL(device_add);
@@ -809,8 +911,10 @@ int device_rename(struct device *dev, char *new_name)
 
        pr_debug("DEVICE: renaming '%s' to '%s'\n", dev->bus_id, new_name);
 
+#ifdef CONFIG_SYSFS_DEPRECATED
        if ((dev->class) && (dev->parent))
                old_class_name = make_class_name(dev->class->name, &dev->kobj);
+#endif
 
        if (dev->class) {
                old_symlink_name = kmalloc(BUS_ID_SIZE, GFP_KERNEL);
@@ -825,6 +929,7 @@ int device_rename(struct device *dev, char *new_name)
 
        error = kobject_rename(&dev->kobj, new_name);
 
+#ifdef CONFIG_SYSFS_DEPRECATED
        if (old_class_name) {
                new_class_name = make_class_name(dev->class->name, &dev->kobj);
                if (new_class_name) {
@@ -833,6 +938,8 @@ int device_rename(struct device *dev, char *new_name)
                        sysfs_remove_link(&dev->parent->kobj, old_class_name);
                }
        }
+#endif
+
        if (dev->class) {
                sysfs_remove_link(&dev->class->subsys.kset.kobj,
                                  old_symlink_name);
@@ -848,3 +955,95 @@ int device_rename(struct device *dev, char *new_name)
 
        return error;
 }
+
+
+static int device_move_class_links(struct device *dev,
+                                  struct device *old_parent,
+                                  struct device *new_parent)
+{
+#ifdef CONFIG_SYSFS_DEPRECATED
+       int error;
+       char *class_name;
+
+       class_name = make_class_name(dev->class->name, &dev->kobj);
+       if (!class_name) {
+               error = PTR_ERR(class_name);
+               class_name = NULL;
+               goto out;
+       }
+       if (old_parent) {
+               sysfs_remove_link(&dev->kobj, "device");
+               sysfs_remove_link(&old_parent->kobj, class_name);
+       }
+       error = sysfs_create_link(&dev->kobj, &new_parent->kobj, "device");
+       if (error)
+               goto out;
+       error = sysfs_create_link(&new_parent->kobj, &dev->kobj, class_name);
+       if (error)
+               sysfs_remove_link(&dev->kobj, "device");
+out:
+       kfree(class_name);
+       return error;
+#else
+       return 0;
+#endif
+}
+
+/**
+ * device_move - moves a device to a new parent
+ * @dev: the pointer to the struct device to be moved
+ * @new_parent: the new parent of the device
+ */
+int device_move(struct device *dev, struct device *new_parent)
+{
+       int error;
+       struct device *old_parent;
+
+       dev = get_device(dev);
+       if (!dev)
+               return -EINVAL;
+
+       if (!device_is_registered(dev)) {
+               error = -EINVAL;
+               goto out;
+       }
+       new_parent = get_device(new_parent);
+       if (!new_parent) {
+               error = -EINVAL;
+               goto out;
+       }
+       pr_debug("DEVICE: moving '%s' to '%s'\n", dev->bus_id,
+               new_parent->bus_id);
+       error = kobject_move(&dev->kobj, &new_parent->kobj);
+       if (error) {
+               put_device(new_parent);
+               goto out;
+       }
+       old_parent = dev->parent;
+       dev->parent = new_parent;
+       if (old_parent)
+               klist_remove(&dev->knode_parent);
+       klist_add_tail(&dev->knode_parent, &new_parent->klist_children);
+       if (!dev->class)
+               goto out_put;
+       error = device_move_class_links(dev, old_parent, new_parent);
+       if (error) {
+               /* We ignore errors on cleanup since we're hosed anyway... */
+               device_move_class_links(dev, new_parent, old_parent);
+               if (!kobject_move(&dev->kobj, &old_parent->kobj)) {
+                       klist_remove(&dev->knode_parent);
+                       if (old_parent)
+                               klist_add_tail(&dev->knode_parent,
+                                              &old_parent->klist_children);
+               }
+               put_device(new_parent);
+               goto out;
+       }
+out_put:
+       put_device(old_parent);
+out:
+       put_device(dev);
+       return error;
+}
+
+EXPORT_SYMBOL_GPL(device_move);
index c5d6bb4290ad2d8fa24c279dc71aaef0b0eb46e4..510e7884975f9f4a4571dd5038ef4b7dbb090f80 100644 (file)
 #define to_drv(node) container_of(node, struct device_driver, kobj.entry)
 
 
-/**
- *     device_bind_driver - bind a driver to one device.
- *     @dev:   device.
- *
- *     Allow manual attachment of a driver to a device.
- *     Caller must have already set @dev->driver.
- *
- *     Note that this does not modify the bus reference count
- *     nor take the bus's rwsem. Please verify those are accounted
- *     for before calling this. (It is ok to call with no other effort
- *     from a driver's probe() method.)
- *
- *     This function must be called with @dev->sem held.
- */
-int device_bind_driver(struct device *dev)
+static void driver_bound(struct device *dev)
 {
-       int ret;
-
        if (klist_node_attached(&dev->knode_driver)) {
                printk(KERN_WARNING "%s: device %s already bound\n",
                        __FUNCTION__, kobject_name(&dev->kobj));
-               return 0;
+               return;
        }
 
        pr_debug("bound device '%s' to driver '%s'\n",
                 dev->bus_id, dev->driver->name);
+
+       if (dev->bus)
+               blocking_notifier_call_chain(&dev->bus->bus_notifier,
+                                            BUS_NOTIFY_BOUND_DRIVER, dev);
+
        klist_add_tail(&dev->knode_driver, &dev->driver->klist_devices);
+}
+
+static int driver_sysfs_add(struct device *dev)
+{
+       int ret;
+
        ret = sysfs_create_link(&dev->driver->kobj, &dev->kobj,
                          kobject_name(&dev->kobj));
        if (ret == 0) {
@@ -65,6 +60,36 @@ int device_bind_driver(struct device *dev)
        return ret;
 }
 
+static void driver_sysfs_remove(struct device *dev)
+{
+       struct device_driver *drv = dev->driver;
+
+       if (drv) {
+               sysfs_remove_link(&drv->kobj, kobject_name(&dev->kobj));
+               sysfs_remove_link(&dev->kobj, "driver");
+       }
+}
+
+/**
+ *     device_bind_driver - bind a driver to one device.
+ *     @dev:   device.
+ *
+ *     Allow manual attachment of a driver to a device.
+ *     Caller must have already set @dev->driver.
+ *
+ *     Note that this does not modify the bus reference count
+ *     nor take the bus's rwsem. Please verify those are accounted
+ *     for before calling this. (It is ok to call with no other effort
+ *     from a driver's probe() method.)
+ *
+ *     This function must be called with @dev->sem held.
+ */
+int device_bind_driver(struct device *dev)
+{
+       driver_bound(dev);
+       return driver_sysfs_add(dev);
+}
+
 struct stupid_thread_structure {
        struct device_driver *drv;
        struct device *dev;
@@ -85,30 +110,32 @@ static int really_probe(void *void_data)
                 drv->bus->name, drv->name, dev->bus_id);
 
        dev->driver = drv;
+       if (driver_sysfs_add(dev)) {
+               printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n",
+                       __FUNCTION__, dev->bus_id);
+               goto probe_failed;
+       }
+
        if (dev->bus->probe) {
                ret = dev->bus->probe(dev);
-               if (ret) {
-                       dev->driver = NULL;
+               if (ret)
                        goto probe_failed;
-               }
        } else if (drv->probe) {
                ret = drv->probe(dev);
-               if (ret) {
-                       dev->driver = NULL;
+               if (ret)
                        goto probe_failed;
-               }
-       }
-       if (device_bind_driver(dev)) {
-               printk(KERN_ERR "%s: device_bind_driver(%s) failed\n",
-                       __FUNCTION__, dev->bus_id);
-               /* How does undo a ->probe?  We're screwed. */
        }
+
+       driver_bound(dev);
        ret = 1;
        pr_debug("%s: Bound Device %s to Driver %s\n",
                 drv->bus->name, dev->bus_id, drv->name);
        goto done;
 
 probe_failed:
+       driver_sysfs_remove(dev);
+       dev->driver = NULL;
+
        if (ret == -ENODEV || ret == -ENXIO) {
                /* Driver matched, but didn't support device
                 * or device not found.
@@ -284,10 +311,15 @@ static void __device_release_driver(struct device * dev)
        drv = dev->driver;
        if (drv) {
                get_driver(drv);
-               sysfs_remove_link(&drv->kobj, kobject_name(&dev->kobj));
+               driver_sysfs_remove(dev);
                sysfs_remove_link(&dev->kobj, "driver");
                klist_remove(&dev->knode_driver);
 
+               if (dev->bus)
+                       blocking_notifier_call_chain(&dev->bus->bus_notifier,
+                                                    BUS_NOTIFY_UNBIND_DRIVER,
+                                                    dev);
+
                if (dev->bus && dev->bus->remove)
                        dev->bus->remove(dev);
                else if (drv->remove)
index 14615694ae9aa3e707435f2f04a1c6dde4586c5c..4bad2870c48516e1e1711dd6d2052c3161733261 100644 (file)
@@ -21,6 +21,8 @@
 #include <linux/firmware.h>
 #include "base.h"
 
+#define to_dev(obj) container_of(obj, struct device, kobj)
+
 MODULE_AUTHOR("Manuel Estrada Sainz <ranty@debian.org>");
 MODULE_DESCRIPTION("Multi purpose firmware loading support");
 MODULE_LICENSE("GPL");
@@ -86,12 +88,12 @@ firmware_timeout_store(struct class *class, const char *buf, size_t count)
 
 static CLASS_ATTR(timeout, 0644, firmware_timeout_show, firmware_timeout_store);
 
-static void  fw_class_dev_release(struct class_device *class_dev);
+static void fw_dev_release(struct device *dev);
 
-static int firmware_class_uevent(struct class_device *class_dev, char **envp,
-                                int num_envp, char *buffer, int buffer_size)
+static int firmware_uevent(struct device *dev, char **envp, int num_envp,
+                          char *buffer, int buffer_size)
 {
-       struct firmware_priv *fw_priv = class_get_devdata(class_dev);
+       struct firmware_priv *fw_priv = dev_get_drvdata(dev);
        int i = 0, len = 0;
 
        if (!test_bit(FW_STATUS_READY, &fw_priv->status))
@@ -110,21 +112,21 @@ static int firmware_class_uevent(struct class_device *class_dev, char **envp,
 
 static struct class firmware_class = {
        .name           = "firmware",
-       .uevent         = firmware_class_uevent,
-       .release        = fw_class_dev_release,
+       .dev_uevent     = firmware_uevent,
+       .dev_release    = fw_dev_release,
 };
 
-static ssize_t
-firmware_loading_show(struct class_device *class_dev, char *buf)
+static ssize_t firmware_loading_show(struct device *dev,
+                                    struct device_attribute *attr, char *buf)
 {
-       struct firmware_priv *fw_priv = class_get_devdata(class_dev);
+       struct firmware_priv *fw_priv = dev_get_drvdata(dev);
        int loading = test_bit(FW_STATUS_LOADING, &fw_priv->status);
        return sprintf(buf, "%d\n", loading);
 }
 
 /**
  * firmware_loading_store - set value in the 'loading' control file
- * @class_dev: class_device pointer
+ * @dev: device pointer
  * @buf: buffer to scan for loading control value
  * @count: number of bytes in @buf
  *
@@ -134,11 +136,11 @@ firmware_loading_show(struct class_device *class_dev, char *buf)
  *      0: Conclude the load and hand the data to the driver code.
  *     -1: Conclude the load with an error and discard any written data.
  **/
-static ssize_t
-firmware_loading_store(struct class_device *class_dev,
-                      const char *buf, size_t count)
+static ssize_t firmware_loading_store(struct device *dev,
+                                     struct device_attribute *attr,
+                                     const char *buf, size_t count)
 {
-       struct firmware_priv *fw_priv = class_get_devdata(class_dev);
+       struct firmware_priv *fw_priv = dev_get_drvdata(dev);
        int loading = simple_strtol(buf, NULL, 10);
 
        switch (loading) {
@@ -174,15 +176,14 @@ firmware_loading_store(struct class_device *class_dev,
        return count;
 }
 
-static CLASS_DEVICE_ATTR(loading, 0644,
-                       firmware_loading_show, firmware_loading_store);
+static DEVICE_ATTR(loading, 0644, firmware_loading_show, firmware_loading_store);
 
 static ssize_t
 firmware_data_read(struct kobject *kobj,
                   char *buffer, loff_t offset, size_t count)
 {
-       struct class_device *class_dev = to_class_dev(kobj);
-       struct firmware_priv *fw_priv = class_get_devdata(class_dev);
+       struct device *dev = to_dev(kobj);
+       struct firmware_priv *fw_priv = dev_get_drvdata(dev);
        struct firmware *fw;
        ssize_t ret_count = count;
 
@@ -234,7 +235,7 @@ fw_realloc_buffer(struct firmware_priv *fw_priv, int min_size)
 
 /**
  * firmware_data_write - write method for firmware
- * @kobj: kobject for the class_device
+ * @kobj: kobject for the device
  * @buffer: buffer being written
  * @offset: buffer offset for write in total data store area
  * @count: buffer size
@@ -246,8 +247,8 @@ static ssize_t
 firmware_data_write(struct kobject *kobj,
                    char *buffer, loff_t offset, size_t count)
 {
-       struct class_device *class_dev = to_class_dev(kobj);
-       struct firmware_priv *fw_priv = class_get_devdata(class_dev);
+       struct device *dev = to_dev(kobj);
+       struct firmware_priv *fw_priv = dev_get_drvdata(dev);
        struct firmware *fw;
        ssize_t retval;
 
@@ -280,13 +281,12 @@ static struct bin_attribute firmware_attr_data_tmpl = {
        .write = firmware_data_write,
 };
 
-static void
-fw_class_dev_release(struct class_device *class_dev)
+static void fw_dev_release(struct device *dev)
 {
-       struct firmware_priv *fw_priv = class_get_devdata(class_dev);
+       struct firmware_priv *fw_priv = dev_get_drvdata(dev);
 
        kfree(fw_priv);
-       kfree(class_dev);
+       kfree(dev);
 
        module_put(THIS_MODULE);
 }
@@ -298,26 +298,23 @@ firmware_class_timeout(u_long data)
        fw_load_abort(fw_priv);
 }
 
-static inline void
-fw_setup_class_device_id(struct class_device *class_dev, struct device *dev)
+static inline void fw_setup_device_id(struct device *f_dev, struct device *dev)
 {
        /* XXX warning we should watch out for name collisions */
-       strlcpy(class_dev->class_id, dev->bus_id, BUS_ID_SIZE);
+       strlcpy(f_dev->bus_id, dev->bus_id, BUS_ID_SIZE);
 }
 
-static int
-fw_register_class_device(struct class_device **class_dev_p,
-                        const char *fw_name, struct device *device)
+static int fw_register_device(struct device **dev_p, const char *fw_name,
+                             struct device *device)
 {
        int retval;
        struct firmware_priv *fw_priv = kzalloc(sizeof(*fw_priv),
                                                GFP_KERNEL);
-       struct class_device *class_dev = kzalloc(sizeof(*class_dev),
-                                                GFP_KERNEL);
+       struct device *f_dev = kzalloc(sizeof(*f_dev), GFP_KERNEL);
 
-       *class_dev_p = NULL;
+       *dev_p = NULL;
 
-       if (!fw_priv || !class_dev) {
+       if (!fw_priv || !f_dev) {
                printk(KERN_ERR "%s: kmalloc failed\n", __FUNCTION__);
                retval = -ENOMEM;
                goto error_kfree;
@@ -331,55 +328,54 @@ fw_register_class_device(struct class_device **class_dev_p,
        fw_priv->timeout.data = (u_long) fw_priv;
        init_timer(&fw_priv->timeout);
 
-       fw_setup_class_device_id(class_dev, device);
-       class_dev->dev = device;
-       class_dev->class = &firmware_class;
-       class_set_devdata(class_dev, fw_priv);
-       retval = class_device_register(class_dev);
+       fw_setup_device_id(f_dev, device);
+       f_dev->parent = device;
+       f_dev->class = &firmware_class;
+       dev_set_drvdata(f_dev, fw_priv);
+       retval = device_register(f_dev);
        if (retval) {
-               printk(KERN_ERR "%s: class_device_register failed\n",
+               printk(KERN_ERR "%s: device_register failed\n",
                       __FUNCTION__);
                goto error_kfree;
        }
-       *class_dev_p = class_dev;
+       *dev_p = f_dev;
        return 0;
 
 error_kfree:
        kfree(fw_priv);
-       kfree(class_dev);
+       kfree(f_dev);
        return retval;
 }
 
-static int
-fw_setup_class_device(struct firmware *fw, struct class_device **class_dev_p,
-                     const char *fw_name, struct device *device, int uevent)
+static int fw_setup_device(struct firmware *fw, struct device **dev_p,
+                          const char *fw_name, struct device *device,
+                          int uevent)
 {
-       struct class_device *class_dev;
+       struct device *f_dev;
        struct firmware_priv *fw_priv;
        int retval;
 
-       *class_dev_p = NULL;
-       retval = fw_register_class_device(&class_dev, fw_name, device);
+       *dev_p = NULL;
+       retval = fw_register_device(&f_dev, fw_name, device);
        if (retval)
                goto out;
 
        /* Need to pin this module until class device is destroyed */
        __module_get(THIS_MODULE);
 
-       fw_priv = class_get_devdata(class_dev);
+       fw_priv = dev_get_drvdata(f_dev);
 
        fw_priv->fw = fw;
-       retval = sysfs_create_bin_file(&class_dev->kobj, &fw_priv->attr_data);
+       retval = sysfs_create_bin_file(&f_dev->kobj, &fw_priv->attr_data);
        if (retval) {
                printk(KERN_ERR "%s: sysfs_create_bin_file failed\n",
                       __FUNCTION__);
                goto error_unreg;
        }
 
-       retval = class_device_create_file(class_dev,
-                                         &class_device_attr_loading);
+       retval = device_create_file(f_dev, &dev_attr_loading);
        if (retval) {
-               printk(KERN_ERR "%s: class_device_create_file failed\n",
+               printk(KERN_ERR "%s: device_create_file failed\n",
                       __FUNCTION__);
                goto error_unreg;
        }
@@ -388,11 +384,11 @@ fw_setup_class_device(struct firmware *fw, struct class_device **class_dev_p,
                 set_bit(FW_STATUS_READY, &fw_priv->status);
         else
                 set_bit(FW_STATUS_READY_NOHOTPLUG, &fw_priv->status);
-       *class_dev_p = class_dev;
+       *dev_p = f_dev;
        goto out;
 
 error_unreg:
-       class_device_unregister(class_dev);
+       device_unregister(f_dev);
 out:
        return retval;
 }
@@ -401,7 +397,7 @@ static int
 _request_firmware(const struct firmware **firmware_p, const char *name,
                 struct device *device, int uevent)
 {
-       struct class_device *class_dev;
+       struct device *f_dev;
        struct firmware_priv *fw_priv;
        struct firmware *firmware;
        int retval;
@@ -417,12 +413,11 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
                goto out;
        }
 
-       retval = fw_setup_class_device(firmware, &class_dev, name, device,
-                                      uevent);
+       retval = fw_setup_device(firmware, &f_dev, name, device, uevent);
        if (retval)
                goto error_kfree_fw;
 
-       fw_priv = class_get_devdata(class_dev);
+       fw_priv = dev_get_drvdata(f_dev);
 
        if (uevent) {
                if (loading_timeout > 0) {
@@ -430,7 +425,7 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
                        add_timer(&fw_priv->timeout);
                }
 
-               kobject_uevent(&class_dev->kobj, KOBJ_ADD);
+               kobject_uevent(&f_dev->kobj, KOBJ_ADD);
                wait_for_completion(&fw_priv->completion);
                set_bit(FW_STATUS_DONE, &fw_priv->status);
                del_timer_sync(&fw_priv->timeout);
@@ -445,7 +440,7 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
        }
        fw_priv->fw = NULL;
        mutex_unlock(&fw_lock);
-       class_device_unregister(class_dev);
+       device_unregister(f_dev);
        goto out;
 
 error_kfree_fw:
index 940ce41f1887cadef797b3462cb777f239938d46..d1df4a0879245d8dee8a91311fdf4ba7e4951a4a 100644 (file)
@@ -388,6 +388,11 @@ static int platform_drv_probe(struct device *_dev)
        return drv->probe(dev);
 }
 
+static int platform_drv_probe_fail(struct device *_dev)
+{
+       return -ENXIO;
+}
+
 static int platform_drv_remove(struct device *_dev)
 {
        struct platform_driver *drv = to_platform_driver(_dev->driver);
@@ -451,6 +456,49 @@ void platform_driver_unregister(struct platform_driver *drv)
 }
 EXPORT_SYMBOL_GPL(platform_driver_unregister);
 
+/**
+ * platform_driver_probe - register driver for non-hotpluggable device
+ * @drv: platform driver structure
+ * @probe: the driver probe routine, probably from an __init section
+ *
+ * Use this instead of platform_driver_register() when you know the device
+ * is not hotpluggable and has already been registered, and you want to
+ * remove its run-once probe() infrastructure from memory after the driver
+ * has bound to the device.
+ *
+ * One typical use for this would be with drivers for controllers integrated
+ * into system-on-chip processors, where the controller devices have been
+ * configured as part of board setup.
+ *
+ * Returns zero if the driver registered and bound to a device, else returns
+ * a negative error code and with the driver not registered.
+ */
+int platform_driver_probe(struct platform_driver *drv,
+               int (*probe)(struct platform_device *))
+{
+       int retval, code;
+
+       /* temporary section violation during probe() */
+       drv->probe = probe;
+       retval = code = platform_driver_register(drv);
+
+       /* Fixup that section violation, being paranoid about code scanning
+        * the list of drivers in order to probe new devices.  Check to see
+        * if the probe was successful, and make sure any forced probes of
+        * new devices fail.
+        */
+       spin_lock(&platform_bus_type.klist_drivers.k_lock);
+       drv->probe = NULL;
+       if (code == 0 && list_empty(&drv->driver.klist_devices.k_list))
+               retval = -ENODEV;
+       drv->driver.probe = platform_drv_probe_fail;
+       spin_unlock(&platform_bus_type.klist_drivers.k_lock);
+
+       if (code != retval)
+               platform_driver_unregister(drv);
+       return retval;
+}
+EXPORT_SYMBOL_GPL(platform_driver_probe);
 
 /* modalias support enables more hands-off userspace setup:
  * (a) environment variable lets new-style hotplug events work once system is
index 28dccb730af99032a9bf653990b604df35ff29b9..3d12b85b09623a9498627fa2889fbccf2156f27d 100644 (file)
@@ -94,54 +94,63 @@ static struct attribute_group topology_attr_group = {
        .name = "topology"
 };
 
+static cpumask_t topology_dev_map = CPU_MASK_NONE;
+
 /* Add/Remove cpu_topology interface for CPU device */
-static int __cpuinit topology_add_dev(struct sys_device * sys_dev)
+static int __cpuinit topology_add_dev(unsigned int cpu)
 {
-       return sysfs_create_group(&sys_dev->kobj, &topology_attr_group);
+       int rc;
+       struct sys_device *sys_dev = get_cpu_sysdev(cpu);
+
+       rc = sysfs_create_group(&sys_dev->kobj, &topology_attr_group);
+       if (!rc)
+               cpu_set(cpu, topology_dev_map);
+       return rc;
 }
 
-static int __cpuinit topology_remove_dev(struct sys_device * sys_dev)
+#ifdef CONFIG_HOTPLUG_CPU
+static void __cpuinit topology_remove_dev(unsigned int cpu)
 {
+       struct sys_device *sys_dev = get_cpu_sysdev(cpu);
+
+       if (!cpu_isset(cpu, topology_dev_map))
+               return;
+       cpu_clear(cpu, topology_dev_map);
        sysfs_remove_group(&sys_dev->kobj, &topology_attr_group);
-       return 0;
 }
 
 static int __cpuinit topology_cpu_callback(struct notifier_block *nfb,
-               unsigned long action, void *hcpu)
+                                          unsigned long action, void *hcpu)
 {
        unsigned int cpu = (unsigned long)hcpu;
-       struct sys_device *sys_dev;
+       int rc = 0;
 
-       sys_dev = get_cpu_sysdev(cpu);
        switch (action) {
-       case CPU_ONLINE:
-               topology_add_dev(sys_dev);
+       case CPU_UP_PREPARE:
+               rc = topology_add_dev(cpu);
                break;
+       case CPU_UP_CANCELED:
        case CPU_DEAD:
-               topology_remove_dev(sys_dev);
+               topology_remove_dev(cpu);
                break;
        }
-       return NOTIFY_OK;
+       return rc ? NOTIFY_BAD : NOTIFY_OK;
 }
-
-static struct notifier_block __cpuinitdata topology_cpu_notifier =
-{
-       .notifier_call = topology_cpu_callback,
-};
+#endif
 
 static int __cpuinit topology_sysfs_init(void)
 {
-       int i;
+       int cpu;
+       int rc;
 
-       for_each_online_cpu(i) {
-               topology_cpu_callback(&topology_cpu_notifier, CPU_ONLINE,
-                               (void *)(long)i);
+       for_each_online_cpu(cpu) {
+               rc = topology_add_dev(cpu);
+               if (rc)
+                       return rc;
        }
-
-       register_hotcpu_notifier(&topology_cpu_notifier);
+       hotcpu_notifier(topology_cpu_callback, 0);
 
        return 0;
 }
 
 device_initcall(topology_sysfs_init);
-
index 7ea0f48f8fa6e63c1bd081d29910d781cd6834b4..2df5cf4ec7432ee98d4daad48cc799c7b9657575 100644 (file)
@@ -2133,16 +2133,14 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
                rq->timeout = 60 * HZ;
                bio = rq->bio;
 
-               if (rq->bio)
-                       blk_queue_bounce(q, &rq->bio);
-
                if (blk_execute_rq(q, cdi->disk, rq, 0)) {
                        struct request_sense *s = rq->sense;
                        ret = -EIO;
                        cdi->last_sense = s->sense_key;
                }
 
-               if (blk_rq_unmap_user(bio, len))
+               rq->bio = bio;
+               if (blk_rq_unmap_user(rq))
                        ret = -EFAULT;
 
                if (ret)
index 2af12fc4511585d4f7aab36b863378eff152764a..ad8b537ad47bc79203dc3d9421f83a5ddd23a33a 100644 (file)
@@ -994,7 +994,7 @@ config HPET
        help
          If you say Y here, you will have a miscdevice named "/dev/hpet/".  Each
          open selects one of the timers supported by the HPET.  The timers are
-         non-periodioc and/or periodic.
+         non-periodic and/or periodic.
 
 config HPET_RTC_IRQ
        bool "HPET Control RTC IRQ" if !HPET_EMULATE_RTC
index 154a81d328c169211809356654c3fe0302a4caf7..ebace201bec6406b122cc835eb19959ccce26c8c 100644 (file)
@@ -162,7 +162,8 @@ static struct miscdevice rng_miscdev = {
 };
 
 
-static ssize_t hwrng_attr_current_store(struct class_device *class,
+static ssize_t hwrng_attr_current_store(struct device *dev,
+                                       struct device_attribute *attr,
                                        const char *buf, size_t len)
 {
        int err;
@@ -192,7 +193,8 @@ static ssize_t hwrng_attr_current_store(struct class_device *class,
        return err ? : len;
 }
 
-static ssize_t hwrng_attr_current_show(struct class_device *class,
+static ssize_t hwrng_attr_current_show(struct device *dev,
+                                      struct device_attribute *attr,
                                       char *buf)
 {
        int err;
@@ -210,7 +212,8 @@ static ssize_t hwrng_attr_current_show(struct class_device *class,
        return ret;
 }
 
-static ssize_t hwrng_attr_available_show(struct class_device *class,
+static ssize_t hwrng_attr_available_show(struct device *dev,
+                                        struct device_attribute *attr,
                                         char *buf)
 {
        int err;
@@ -234,20 +237,18 @@ static ssize_t hwrng_attr_available_show(struct class_device *class,
        return ret;
 }
 
-static CLASS_DEVICE_ATTR(rng_current, S_IRUGO | S_IWUSR,
-                        hwrng_attr_current_show,
-                        hwrng_attr_current_store);
-static CLASS_DEVICE_ATTR(rng_available, S_IRUGO,
-                        hwrng_attr_available_show,
-                        NULL);
+static DEVICE_ATTR(rng_current, S_IRUGO | S_IWUSR,
+                  hwrng_attr_current_show,
+                  hwrng_attr_current_store);
+static DEVICE_ATTR(rng_available, S_IRUGO,
+                  hwrng_attr_available_show,
+                  NULL);
 
 
 static void unregister_miscdev(void)
 {
-       class_device_remove_file(rng_miscdev.class,
-                                &class_device_attr_rng_available);
-       class_device_remove_file(rng_miscdev.class,
-                                &class_device_attr_rng_current);
+       device_remove_file(rng_miscdev.this_device, &dev_attr_rng_available);
+       device_remove_file(rng_miscdev.this_device, &dev_attr_rng_current);
        misc_deregister(&rng_miscdev);
 }
 
@@ -258,20 +259,19 @@ static int register_miscdev(void)
        err = misc_register(&rng_miscdev);
        if (err)
                goto out;
-       err = class_device_create_file(rng_miscdev.class,
-                                      &class_device_attr_rng_current);
+       err = device_create_file(rng_miscdev.this_device,
+                                &dev_attr_rng_current);
        if (err)
                goto err_misc_dereg;
-       err = class_device_create_file(rng_miscdev.class,
-                                      &class_device_attr_rng_available);
+       err = device_create_file(rng_miscdev.this_device,
+                                &dev_attr_rng_available);
        if (err)
                goto err_remove_current;
 out:
        return err;
 
 err_remove_current:
-       class_device_remove_file(rng_miscdev.class,
-                                &class_device_attr_rng_current);
+       device_remove_file(rng_miscdev.this_device, &dev_attr_rng_current);
 err_misc_dereg:
        misc_deregister(&rng_miscdev);
        goto out;
index 55473371b7c6934abe8486af6fc3055701187140..e67eef4867ba02c8af26652b811b290057bf959e 100644 (file)
@@ -980,10 +980,10 @@ static int __init chr_dev_init(void)
 
        mem_class = class_create(THIS_MODULE, "mem");
        for (i = 0; i < ARRAY_SIZE(devlist); i++)
-               class_device_create(mem_class, NULL,
-                                       MKDEV(MEM_MAJOR, devlist[i].minor),
-                                       NULL, devlist[i].name);
-       
+               device_create(mem_class, NULL,
+                             MKDEV(MEM_MAJOR, devlist[i].minor),
+                             devlist[i].name);
+
        return 0;
 }
 
index 62ebe09656e3ad68b18992a0c0e4a8557c9f7992..7a484fc7cb9eae84d0a3b04e82f18c6e7e263955 100644 (file)
@@ -169,11 +169,6 @@ fail:
        return err;
 }
 
-/* 
- * TODO for 2.7:
- *  - add a struct kref to struct miscdevice and make all usages of
- *    them dynamic.
- */
 static struct class *misc_class;
 
 static const struct file_operations misc_fops = {
@@ -228,10 +223,10 @@ int misc_register(struct miscdevice * misc)
                misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7);
        dev = MKDEV(MISC_MAJOR, misc->minor);
 
-       misc->class = class_device_create(misc_class, NULL, dev, misc->dev,
+       misc->this_device = device_create(misc_class, misc->parent, dev,
                                          "%s", misc->name);
-       if (IS_ERR(misc->class)) {
-               err = PTR_ERR(misc->class);
+       if (IS_ERR(misc->this_device)) {
+               err = PTR_ERR(misc->this_device);
                goto out;
        }
 
@@ -264,7 +259,7 @@ int misc_deregister(struct miscdevice * misc)
 
        down(&misc_sem);
        list_del(&misc->list);
-       class_device_destroy(misc_class, MKDEV(MISC_MAJOR, misc->minor));
+       device_destroy(misc_class, MKDEV(MISC_MAJOR, misc->minor));
        if (i < DYNAMIC_MINORS && i>0) {
                misc_minors[i>>3] &= ~(1 << (misc->minor & 7));
        }
index efc485edad1c26ebbb1d3a43a95c9b54f881d617..c1e3dd837fc84fdef05d7eb987935fdfe79b4d78 100644 (file)
@@ -752,13 +752,13 @@ static const struct file_operations pp_fops = {
 
 static void pp_attach(struct parport *port)
 {
-       class_device_create(ppdev_class, NULL, MKDEV(PP_MAJOR, port->number),
-                       NULL, "parport%d", port->number);
+       device_create(ppdev_class, NULL, MKDEV(PP_MAJOR, port->number),
+                       "parport%d", port->number);
 }
 
 static void pp_detach(struct parport *port)
 {
-       class_device_destroy(ppdev_class, MKDEV(PP_MAJOR, port->number));
+       device_destroy(ppdev_class, MKDEV(PP_MAJOR, port->number));
 }
 
 static struct parport_driver pp_driver = {
index 89b718e326e5a0873ca0002cc76441a3c5469238..3b32313f6eb46e7b05911ef48ef6aa48c1e0dfba 100644 (file)
@@ -127,9 +127,9 @@ raw_ioctl(struct inode *inode, struct file *filp,
 
 static void bind_device(struct raw_config_request *rq)
 {
-       class_device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor));
-       class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor),
-                                     NULL, "raw%d", rq->raw_minor);
+       device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor));
+       device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor),
+                     "raw%d", rq->raw_minor);
 }
 
 /*
@@ -200,7 +200,7 @@ static int raw_ctl_ioctl(struct inode *inode, struct file *filp,
                        if (rq.block_major == 0 && rq.block_minor == 0) {
                                /* unbind */
                                rawdev->binding = NULL;
-                               class_device_destroy(raw_class,
+                               device_destroy(raw_class,
                                                MKDEV(RAW_MAJOR, rq.raw_minor));
                        } else {
                                rawdev->binding = bdget(dev);
@@ -283,7 +283,7 @@ static int __init raw_init(void)
                ret = PTR_ERR(raw_class);
                goto error_region;
        }
-       class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl");
+       device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), "rawctl");
 
        return 0;
 
@@ -295,7 +295,7 @@ error:
 
 static void __exit raw_exit(void)
 {
-       class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0));
+       device_destroy(raw_class, MKDEV(RAW_MAJOR, 0));
        class_destroy(raw_class);
        cdev_del(&raw_cdev);
        unregister_chrdev_region(MKDEV(RAW_MAJOR, 0), MAX_RAW_MINORS);
index 4df6ab2206a1b77159e3bf88731e9d2d84ac8a17..167ebc84e8d7361d35577ce59d4a74379437c0c4 100644 (file)
@@ -922,7 +922,7 @@ int RIOUnUse(unsigned long iPortP, struct CmdBlk *CmdBlkP)
 ** 
 ** Packet is an actual packet structure to be filled in with the packet
 ** information associated with the command. You need to fill in everything,
-** as the command processore doesn't process the command packet in any way.
+** as the command processor doesn't process the command packet in any way.
 ** 
 ** The PreFuncP is called before the packet is enqueued on the host rup.
 ** PreFuncP is called as (*PreFuncP)(PreArg, CmdBlkP);. PreFuncP must
index 99f3df02b61c31adff0df7bcce73659fed7a5992..0794844369d6fcdedda20fae17ddd5d39c21f6e7 100644 (file)
@@ -222,7 +222,7 @@ int RIOBoardTest(unsigned long paddr, void __iomem *caddr, unsigned char type, i
 ** which value will be written into memory.
 ** Call with op set to zero means that the RAM will not be read and checked
 ** before it is written.
-** Call with op not zero, and the RAM will be read and compated with val[op-1]
+** Call with op not zero and the RAM will be read and compared with val[op-1]
 ** to check that the data from the previous phase was retained.
 */
 
index 1066d976070487c6427c42b23bca1d8f754bf1b2..bb498d24adcc471cf08e50fa076e093eb5f9c54b 100644 (file)
@@ -87,8 +87,8 @@ static char *_rioparam_c_sccs_ = "@(#)rioparam.c      1.3";
 ** command bit set onto the port. The command bit is in the len field,
 ** and gets ORed in with the actual byte count.
 **
-** When you send a packet with the command bit set, then the first
-** data byte ( data[0] ) is interpretted as the command to execute.
+** When you send a packet with the command bit set the first
+** data byte (data[0]) is interpreted as the command to execute.
 ** It also governs what data structure overlay should accompany the packet.
 ** Commands are defined in cirrus/cirrus.h
 **
@@ -103,7 +103,7 @@ static char *_rioparam_c_sccs_ = "@(#)rioparam.c    1.3";
 **
 ** Most commands do not use the remaining bytes in the data array. The
 ** exceptions are OPEN MOPEN and CONFIG. (NB. As with the SI CONFIG and
-** OPEN are currently analagous). With these three commands the following
+** OPEN are currently analogous). With these three commands the following
 ** 11 data bytes are all used to pass config information such as baud rate etc.
 ** The fields are also defined in cirrus.h. Some contain straightforward
 ** information such as the transmit XON character. Two contain the transmit and
index 6ad2d3bb945c06fc2dc86d92eaa8d2fa410c0308..6e1329d404d201ce50f5ff981fede21cbf317d95 100644 (file)
@@ -1130,7 +1130,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, const struct tpm_vend
        scnprintf(devname, DEVNAME_SIZE, "%s%d", "tpm", chip->dev_num);
        chip->vendor.miscdev.name = devname;
 
-       chip->vendor.miscdev.dev = dev;
+       chip->vendor.miscdev.parent = dev;
        chip->dev = get_device(dev);
 
        if (misc_register(&chip->vendor.miscdev)) {
index e90ea39c7c4b1112fd7d7db878b96d8531a0f162..50dc49205a231a2c5854a0e9699e39e5db9e6bed 100644 (file)
@@ -3612,7 +3612,8 @@ static struct class *tty_class;
  *             This field is optional, if there is no known struct device
  *             for this tty device it can be set to NULL safely.
  *
- *     Returns a pointer to the class device (or ERR_PTR(-EFOO) on error).
+ *     Returns a pointer to the struct device for this tty device
+ *     (or ERR_PTR(-EFOO) on error).
  *
  *     This call is required to be made to register an individual tty device
  *     if the tty driver's flags have the TTY_DRIVER_DYNAMIC_DEV bit set.  If
@@ -3622,8 +3623,8 @@ static struct class *tty_class;
  *     Locking: ??
  */
 
-struct class_device *tty_register_device(struct tty_driver *driver,
-                                        unsigned index, struct device *device)
+struct device *tty_register_device(struct tty_driver *driver, unsigned index,
+                                  struct device *device)
 {
        char name[64];
        dev_t dev = MKDEV(driver->major, driver->minor_start) + index;
@@ -3639,7 +3640,7 @@ struct class_device *tty_register_device(struct tty_driver *driver,
        else
                tty_line_name(driver, index, name);
 
-       return class_device_create(tty_class, NULL, dev, device, "%s", name);
+       return device_create(tty_class, device, dev, name);
 }
 
 /**
@@ -3655,7 +3656,7 @@ struct class_device *tty_register_device(struct tty_driver *driver,
 
 void tty_unregister_device(struct tty_driver *driver, unsigned index)
 {
-       class_device_destroy(tty_class, MKDEV(driver->major, driver->minor_start) + index);
+       device_destroy(tty_class, MKDEV(driver->major, driver->minor_start) + index);
 }
 
 EXPORT_SYMBOL(tty_register_device);
@@ -3895,20 +3896,20 @@ static int __init tty_init(void)
        if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
            register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
                panic("Couldn't register /dev/tty driver\n");
-       class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty");
+       device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), "tty");
 
        cdev_init(&console_cdev, &console_fops);
        if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) ||
            register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0)
                panic("Couldn't register /dev/console driver\n");
-       class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console");
+       device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), "console");
 
 #ifdef CONFIG_UNIX98_PTYS
        cdev_init(&ptmx_cdev, &ptmx_fops);
        if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
            register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
                panic("Couldn't register /dev/ptmx driver\n");
-       class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx");
+       device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), "ptmx");
 #endif
 
 #ifdef CONFIG_VT
@@ -3916,7 +3917,7 @@ static int __init tty_init(void)
        if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
            register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
                panic("Couldn't register /dev/tty0 driver\n");
-       class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
+       device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), "tty0");
 
        vty_init();
 #endif
index bd7a98c6ea7afb6b94bb392381157aa9e945c339..f442b574b44ad00e40d5e08c570197c1deace7c6 100644 (file)
@@ -476,16 +476,16 @@ static struct class *vc_class;
 
 void vcs_make_sysfs(struct tty_struct *tty)
 {
-       class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
-                       NULL, "vcs%u", tty->index + 1);
-       class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
-                       NULL, "vcsa%u", tty->index + 1);
+       device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
+                       "vcs%u", tty->index + 1);
+       device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
+                       "vcsa%u", tty->index + 1);
 }
 
 void vcs_remove_sysfs(struct tty_struct *tty)
 {
-       class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1));
-       class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129));
+       device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1));
+       device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129));
 }
 
 int __init vcs_init(void)
@@ -494,7 +494,7 @@ int __init vcs_init(void)
                panic("unable to get major %d for vcs device", VCS_MAJOR);
        vc_class = class_create(THIS_MODULE, "vc");
 
-       class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
-       class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
+       device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), "vcs");
+       device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), "vcsa");
        return 0;
 }
index 8e4413f6fbaf6145352ffb5e7c9af0530240cc79..87587b4385abcb88dc72d4a113052d17baae9c5e 100644 (file)
 struct con_driver {
        const struct consw *con;
        const char *desc;
-       struct class_device *class_dev;
+       struct device *dev;
        int node;
        int first;
        int last;
@@ -3023,10 +3023,10 @@ static inline int vt_unbind(struct con_driver *con)
 }
 #endif /* CONFIG_VT_HW_CONSOLE_BINDING */
 
-static ssize_t store_bind(struct class_device *class_device,
+static ssize_t store_bind(struct device *dev, struct device_attribute *attr,
                          const char *buf, size_t count)
 {
-       struct con_driver *con = class_get_devdata(class_device);
+       struct con_driver *con = dev_get_drvdata(dev);
        int bind = simple_strtoul(buf, NULL, 0);
 
        if (bind)
@@ -3037,17 +3037,19 @@ static ssize_t store_bind(struct class_device *class_device,
        return count;
 }
 
-static ssize_t show_bind(struct class_device *class_device, char *buf)
+static ssize_t show_bind(struct device *dev, struct device_attribute *attr,
+                        char *buf)
 {
-       struct con_driver *con = class_get_devdata(class_device);
+       struct con_driver *con = dev_get_drvdata(dev);
        int bind = con_is_bound(con->con);
 
        return snprintf(buf, PAGE_SIZE, "%i\n", bind);
 }
 
-static ssize_t show_name(struct class_device *class_device, char *buf)
+static ssize_t show_name(struct device *dev, struct device_attribute *attr,
+                        char *buf)
 {
-       struct con_driver *con = class_get_devdata(class_device);
+       struct con_driver *con = dev_get_drvdata(dev);
 
        return snprintf(buf, PAGE_SIZE, "%s %s\n",
                        (con->flag & CON_DRIVER_FLAG_MODULE) ? "(M)" : "(S)",
@@ -3055,43 +3057,40 @@ static ssize_t show_name(struct class_device *class_device, char *buf)
 
 }
 
-static struct class_device_attribute class_device_attrs[] = {
+static struct device_attribute device_attrs[] = {
        __ATTR(bind, S_IRUGO|S_IWUSR, show_bind, store_bind),
        __ATTR(name, S_IRUGO, show_name, NULL),
 };
 
-static int vtconsole_init_class_device(struct con_driver *con)
+static int vtconsole_init_device(struct con_driver *con)
 {
        int i;
        int error = 0;
 
        con->flag |= CON_DRIVER_FLAG_ATTR;
-       class_set_devdata(con->class_dev, con);
-       for (i = 0; i < ARRAY_SIZE(class_device_attrs); i++) {
-               error = class_device_create_file(con->class_dev,
-                                        &class_device_attrs[i]);
+       dev_set_drvdata(con->dev, con);
+       for (i = 0; i < ARRAY_SIZE(device_attrs); i++) {
+               error = device_create_file(con->dev, &device_attrs[i]);
                if (error)
                        break;
        }
 
        if (error) {
                while (--i >= 0)
-                       class_device_remove_file(con->class_dev,
-                                        &class_device_attrs[i]);
+                       device_remove_file(con->dev, &device_attrs[i]);
                con->flag &= ~CON_DRIVER_FLAG_ATTR;
        }
 
        return error;
 }
 
-static void vtconsole_deinit_class_device(struct con_driver *con)
+static void vtconsole_deinit_device(struct con_driver *con)
 {
        int i;
 
        if (con->flag & CON_DRIVER_FLAG_ATTR) {
-               for (i = 0; i < ARRAY_SIZE(class_device_attrs); i++)
-                       class_device_remove_file(con->class_dev,
-                                                &class_device_attrs[i]);
+               for (i = 0; i < ARRAY_SIZE(device_attrs); i++)
+                       device_remove_file(con->dev, &device_attrs[i]);
                con->flag &= ~CON_DRIVER_FLAG_ATTR;
        }
 }
@@ -3179,18 +3178,17 @@ int register_con_driver(const struct consw *csw, int first, int last)
        if (retval)
                goto err;
 
-       con_driver->class_dev = class_device_create(vtconsole_class, NULL,
-                                                   MKDEV(0, con_driver->node),
-                                                   NULL, "vtcon%i",
-                                                   con_driver->node);
+       con_driver->dev = device_create(vtconsole_class, NULL,
+                                       MKDEV(0, con_driver->node),
+                                       "vtcon%i", con_driver->node);
 
-       if (IS_ERR(con_driver->class_dev)) {
-               printk(KERN_WARNING "Unable to create class_device for %s; "
+       if (IS_ERR(con_driver->dev)) {
+               printk(KERN_WARNING "Unable to create device for %s; "
                       "errno = %ld\n", con_driver->desc,
-                      PTR_ERR(con_driver->class_dev));
-               con_driver->class_dev = NULL;
+                      PTR_ERR(con_driver->dev));
+               con_driver->dev = NULL;
        } else {
-               vtconsole_init_class_device(con_driver);
+               vtconsole_init_device(con_driver);
        }
 
 err:
@@ -3226,12 +3224,12 @@ int unregister_con_driver(const struct consw *csw)
 
                if (con_driver->con == csw &&
                    con_driver->flag & CON_DRIVER_FLAG_MODULE) {
-                       vtconsole_deinit_class_device(con_driver);
-                       class_device_destroy(vtconsole_class,
-                                            MKDEV(0, con_driver->node));
+                       vtconsole_deinit_device(con_driver);
+                       device_destroy(vtconsole_class,
+                                      MKDEV(0, con_driver->node));
                        con_driver->con = NULL;
                        con_driver->desc = NULL;
-                       con_driver->class_dev = NULL;
+                       con_driver->dev = NULL;
                        con_driver->node = 0;
                        con_driver->flag = 0;
                        con_driver->first = 0;
@@ -3289,19 +3287,18 @@ static int __init vtconsole_class_init(void)
        for (i = 0; i < MAX_NR_CON_DRIVER; i++) {
                struct con_driver *con = &registered_con_driver[i];
 
-               if (con->con && !con->class_dev) {
-                       con->class_dev =
-                               class_device_create(vtconsole_class, NULL,
-                                                   MKDEV(0, con->node), NULL,
-                                                   "vtcon%i", con->node);
+               if (con->con && !con->dev) {
+                       con->dev = device_create(vtconsole_class, NULL,
+                                                MKDEV(0, con->node),
+                                                "vtcon%i", con->node);
 
-                       if (IS_ERR(con->class_dev)) {
+                       if (IS_ERR(con->dev)) {
                                printk(KERN_WARNING "Unable to create "
-                                      "class_device for %s; errno = %ld\n",
-                                      con->desc, PTR_ERR(con->class_dev));
-                               con->class_dev = NULL;
+                                      "device for %s; errno = %ld\n",
+                                      con->desc, PTR_ERR(con->dev));
+                               con->dev = NULL;
                        } else {
-                               vtconsole_init_class_device(con);
+                               vtconsole_init_device(con);
                        }
                }
        }
index 3f869033ed70cd212c6a99a6d54f4b615abfbed1..94a4e9a3013c0c470ea93d95f4f5020d14f0141a 100644 (file)
@@ -42,7 +42,7 @@ static struct i2c_driver i2cdev_driver;
 struct i2c_dev {
        struct list_head list;
        struct i2c_adapter *adap;
-       struct class_device *class_dev;
+       struct device *dev;
 };
 
 #define I2C_MINORS     256
@@ -92,15 +92,16 @@ static void return_i2c_dev(struct i2c_dev *i2c_dev)
        spin_unlock(&i2c_dev_list_lock);
 }
 
-static ssize_t show_adapter_name(struct class_device *class_dev, char *buf)
+static ssize_t show_adapter_name(struct device *dev,
+                                struct device_attribute *attr, char *buf)
 {
-       struct i2c_dev *i2c_dev = i2c_dev_get_by_minor(MINOR(class_dev->devt));
+       struct i2c_dev *i2c_dev = i2c_dev_get_by_minor(MINOR(dev->devt));
 
        if (!i2c_dev)
                return -ENODEV;
        return sprintf(buf, "%s\n", i2c_dev->adap->name);
 }
-static CLASS_DEVICE_ATTR(name, S_IRUGO, show_adapter_name, NULL);
+static DEVICE_ATTR(name, S_IRUGO, show_adapter_name, NULL);
 
 static ssize_t i2cdev_read (struct file *file, char __user *buf, size_t count,
                             loff_t *offset)
@@ -413,15 +414,14 @@ static int i2cdev_attach_adapter(struct i2c_adapter *adap)
                return PTR_ERR(i2c_dev);
 
        /* register this i2c device with the driver core */
-       i2c_dev->class_dev = class_device_create(i2c_dev_class, NULL,
-                                                MKDEV(I2C_MAJOR, adap->nr),
-                                                &adap->dev, "i2c-%d",
-                                                adap->nr);
-       if (!i2c_dev->class_dev) {
+       i2c_dev->dev = device_create(i2c_dev_class, &adap->dev,
+                                    MKDEV(I2C_MAJOR, adap->nr),
+                                    "i2c-%d", adap->nr);
+       if (!i2c_dev->dev) {
                res = -ENODEV;
                goto error;
        }
-       res = class_device_create_file(i2c_dev->class_dev, &class_device_attr_name);
+       res = device_create_file(i2c_dev->dev, &dev_attr_name);
        if (res)
                goto error_destroy;
 
@@ -429,7 +429,7 @@ static int i2cdev_attach_adapter(struct i2c_adapter *adap)
                 adap->name, adap->nr);
        return 0;
 error_destroy:
-       class_device_destroy(i2c_dev_class, MKDEV(I2C_MAJOR, adap->nr));
+       device_destroy(i2c_dev_class, MKDEV(I2C_MAJOR, adap->nr));
 error:
        return_i2c_dev(i2c_dev);
        kfree(i2c_dev);
@@ -444,9 +444,9 @@ static int i2cdev_detach_adapter(struct i2c_adapter *adap)
        if (!i2c_dev) /* attach_adapter must have failed */
                return 0;
 
-       class_device_remove_file(i2c_dev->class_dev, &class_device_attr_name);
+       device_remove_file(i2c_dev->dev, &dev_attr_name);
        return_i2c_dev(i2c_dev);
-       class_device_destroy(i2c_dev_class, MKDEV(I2C_MAJOR, adap->nr));
+       device_destroy(i2c_dev_class, MKDEV(I2C_MAJOR, adap->nr));
        kfree(i2c_dev);
 
        pr_debug("i2c-dev: adapter [%s] unregistered\n", adap->name);
index 8ccee9c769f8ad54ee80f539a16eaa3a15615684..e3a267622bb6073fdcb5911dfca2c4178bdf670f 100644 (file)
@@ -1635,7 +1635,7 @@ static int idefloppy_begin_format(ide_drive_t *drive, int __user *arg)
 /*
 ** Get ATAPI_FORMAT_UNIT progress indication.
 **
-** Userland gives a pointer to an int.  The int is set to a progresss
+** Userland gives a pointer to an int.  The int is set to a progress
 ** indicator 0-65536, with 65536=100%.
 **
 ** If the drive does not support format progress indication, we just check
index ba2a2035d6483467680d94dd54df397f0780526a..7c8d0399ae820ae6996f888f07910126bc3607f6 100644 (file)
@@ -297,7 +297,7 @@ static int serio_raw_connect(struct serio *serio, struct serio_driver *drv)
 
        serio_raw->dev.minor = PSMOUSE_MINOR;
        serio_raw->dev.name = serio_raw->name;
-       serio_raw->dev.dev = &serio->dev;
+       serio_raw->dev.parent = &serio->dev;
        serio_raw->dev.fops = &serio_raw_fops;
 
        err = misc_register(&serio_raw->dev);
index 5800beeebb8589f0d5cac5d2cbd414c1fa8b359e..defd5743dba6c7d0626cb4e165159f2ffe2756ed 100644 (file)
@@ -702,7 +702,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
        cs->open_count = 0;
        cs->dev = NULL;
        cs->tty = NULL;
-       cs->class = NULL;
+       cs->tty_dev = NULL;
        cs->cidmode = cidmode != 0;
 
        //if(onechannel) { //FIXME
index 884bd72c1bf47fa9b5c8656a14f025d3f13eeeb8..06298cc52bf5bd7e52caaa9c503be27d3137f767 100644 (file)
@@ -444,7 +444,7 @@ struct cardstate {
        struct gigaset_driver *driver;
        unsigned minor_index;
        struct device *dev;
-       struct class_device *class;
+       struct device *tty_dev;
 
        const struct gigaset_ops *ops;
 
index 596f3aebe2f7748c553aa50c860866aa8e37b205..7edea015867e8c7cd1ccca220d3549372dc67977 100644 (file)
@@ -625,13 +625,13 @@ void gigaset_if_init(struct cardstate *cs)
                return;
 
        tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs);
-       cs->class = tty_register_device(drv->tty, cs->minor_index, NULL);
+       cs->tty_dev = tty_register_device(drv->tty, cs->minor_index, NULL);
 
-       if (!IS_ERR(cs->class))
-               class_set_devdata(cs->class, cs);
+       if (!IS_ERR(cs->tty_dev))
+               dev_set_drvdata(cs->tty_dev, cs);
        else {
                warn("could not register device to the tty subsystem");
-               cs->class = NULL;
+               cs->tty_dev = NULL;
        }
 }
 
@@ -645,7 +645,7 @@ void gigaset_if_free(struct cardstate *cs)
 
        tasklet_disable(&cs->if_wake_tasklet);
        tasklet_kill(&cs->if_wake_tasklet);
-       cs->class = NULL;
+       cs->tty_dev = NULL;
        tty_unregister_device(drv->tty, cs->minor_index);
 }
 
index 9ad840e95dbe8247928b6191fcedcac8fe2ab63b..e767afa55abfa5cf6b0ee8a3dd25d46893ee15b4 100644 (file)
 #include "gigaset.h"
 #include <linux/ctype.h>
 
-static ssize_t show_cidmode(struct class_device *class, char *buf)
+static ssize_t show_cidmode(struct device *dev,
+                           struct device_attribute *attr, char *buf)
 {
        int ret;
        unsigned long flags;
-       struct cardstate *cs = class_get_devdata(class);
+       struct cardstate *cs = dev_get_drvdata(dev);
 
        spin_lock_irqsave(&cs->lock, flags);
        ret = sprintf(buf, "%u\n", cs->cidmode);
@@ -29,10 +30,10 @@ static ssize_t show_cidmode(struct class_device *class, char *buf)
        return ret;
 }
 
-static ssize_t set_cidmode(struct class_device *class,
+static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr,
                           const char *buf, size_t count)
 {
-       struct cardstate *cs = class_get_devdata(class);
+       struct cardstate *cs = dev_get_drvdata(dev);
        long int value;
        char *end;
 
@@ -64,25 +65,25 @@ static ssize_t set_cidmode(struct class_device *class,
        return count;
 }
 
-static CLASS_DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode);
+static DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode);
 
 /* free sysfs for device */
 void gigaset_free_dev_sysfs(struct cardstate *cs)
 {
-       if (!cs->class)
+       if (!cs->tty_dev)
                return;
 
        gig_dbg(DEBUG_INIT, "removing sysfs entries");
-       class_device_remove_file(cs->class, &class_device_attr_cidmode);
+       device_remove_file(cs->tty_dev, &dev_attr_cidmode);
 }
 
 /* initialize sysfs for device */
 void gigaset_init_dev_sysfs(struct cardstate *cs)
 {
-       if (!cs->class)
+       if (!cs->tty_dev)
                return;
 
        gig_dbg(DEBUG_INIT, "setting up sysfs");
-       if (class_device_create_file(cs->class, &class_device_attr_cidmode))
+       if (device_create_file(cs->tty_dev, &dev_attr_cidmode))
                dev_err(cs->dev, "could not create sysfs attribute\n");
 }
index 11e6f937c1e479c477798f49533d0629c0707f73..7b4ec3f60dbf6c61b5d0b24e584d6aa137f7a73f 100644 (file)
@@ -464,7 +464,7 @@ int diva_4bri_init_card(diva_os_xdi_adapter_t * a)
 
 /*
 **  Cleanup function will be called for master adapter only
-**  this is garanteed by design: cleanup callback is set
+**  this is guaranteed by design: cleanup callback is set
 **  by master adapter only
 */
 static int diva_4bri_cleanup_adapter(diva_os_xdi_adapter_t * a)
index e8f9c077fa85fb183a47e81844e9f08f2080bb42..9d5d2a56b4e9e7e8d184f92f21498b3360360999 100644 (file)
@@ -16,7 +16,7 @@
 
 /*
 *  include Genero generated HFC-4S/8S header file hfc48scu.h
-*  for comlete register description. This will define _HFC48SCU_H_
+*  for complete register description. This will define _HFC48SCU_H_
 *  to prevent redefinitions
 */
 
index 6d043172555520c50cb0ddb87a15a0d5fb9ef533..cd3b5ad534914cd1409d5b62ed28169d61d0677a 100644 (file)
@@ -1442,7 +1442,7 @@ l2_tei_remove(struct FsmInst *fi, int event, void *arg)
 }
 
 static void
-l2_st14_persistant_da(struct FsmInst *fi, int event, void *arg)
+l2_st14_persistent_da(struct FsmInst *fi, int event, void *arg)
 {
        struct PStack *st = fi->userdata;
        
@@ -1453,7 +1453,7 @@ l2_st14_persistant_da(struct FsmInst *fi, int event, void *arg)
 }
 
 static void
-l2_st5_persistant_da(struct FsmInst *fi, int event, void *arg)
+l2_st5_persistent_da(struct FsmInst *fi, int event, void *arg)
 {
        struct PStack *st = fi->userdata;
 
@@ -1466,7 +1466,7 @@ l2_st5_persistant_da(struct FsmInst *fi, int event, void *arg)
 }
 
 static void
-l2_st6_persistant_da(struct FsmInst *fi, int event, void *arg)
+l2_st6_persistent_da(struct FsmInst *fi, int event, void *arg)
 {
        struct PStack *st = fi->userdata;
 
@@ -1477,7 +1477,7 @@ l2_st6_persistant_da(struct FsmInst *fi, int event, void *arg)
 }
 
 static void
-l2_persistant_da(struct FsmInst *fi, int event, void *arg)
+l2_persistent_da(struct FsmInst *fi, int event, void *arg)
 {
        struct PStack *st = fi->userdata;
 
@@ -1612,14 +1612,14 @@ static struct FsmNode L2FnList[] __initdata =
        {ST_L2_6, EV_L2_FRAME_ERROR, l2_frame_error},
        {ST_L2_7, EV_L2_FRAME_ERROR, l2_frame_error_reest},
        {ST_L2_8, EV_L2_FRAME_ERROR, l2_frame_error_reest},
-       {ST_L2_1, EV_L1_DEACTIVATE, l2_st14_persistant_da},
+       {ST_L2_1, EV_L1_DEACTIVATE, l2_st14_persistent_da},
        {ST_L2_2, EV_L1_DEACTIVATE, l2_st24_tei_remove},
        {ST_L2_3, EV_L1_DEACTIVATE, l2_st3_tei_remove},
-       {ST_L2_4, EV_L1_DEACTIVATE, l2_st14_persistant_da},
-       {ST_L2_5, EV_L1_DEACTIVATE, l2_st5_persistant_da},
-       {ST_L2_6, EV_L1_DEACTIVATE, l2_st6_persistant_da},
-       {ST_L2_7, EV_L1_DEACTIVATE, l2_persistant_da},
-       {ST_L2_8, EV_L1_DEACTIVATE, l2_persistant_da},
+       {ST_L2_4, EV_L1_DEACTIVATE, l2_st14_persistent_da},
+       {ST_L2_5, EV_L1_DEACTIVATE, l2_st5_persistent_da},
+       {ST_L2_6, EV_L1_DEACTIVATE, l2_st6_persistent_da},
+       {ST_L2_7, EV_L1_DEACTIVATE, l2_persistent_da},
+       {ST_L2_8, EV_L1_DEACTIVATE, l2_persistent_da},
 };
 
 #define L2_FN_COUNT (sizeof(L2FnList)/sizeof(struct FsmNode))
index fc1267b8c892f43627b9a8c2e1749fad25ad64fe..9a155396d6acd1648d45f255d5faf04ef8be9720 100644 (file)
@@ -500,14 +500,14 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte
 
 /*      New design (By Emard)
 **      this rps1 code will copy internal HS event to GPIO3 pin.
-**      GPIO3 is in budget-patch hardware connectd to port B VSYNC
+**      GPIO3 is in budget-patch hardware connected to port B VSYNC
 
 **      HS is an internal event of 7146, accessible with RPS
 **      and temporarily raised high every n lines
 **      (n in defined in the RPS_THRESH1 counter threshold)
 **      I think HS is raised high on the beginning of the n-th line
 **      and remains high until this n-th line that triggered
-**      it is completely received. When the receiption of n-th line
+**      it is completely received. When the reception of n-th line
 **      ends, HS is lowered.
 
 **      To transmit data over DMA, 7146 needs changing state at
@@ -541,7 +541,7 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte
 **      hardware debug note: a working budget card (including budget patch)
 **      with vpeirq() interrupt setup in mode "0x90" (every 64K) will
 **      generate 3 interrupts per 25-Hz DMA frame of 2*188*512 bytes
-**      and that means 3*25=75 Hz of interrupt freqency, as seen by
+**      and that means 3*25=75 Hz of interrupt frequency, as seen by
 **      watch cat /proc/interrupts
 **
 **      If this frequency is 3x lower (and data received in the DMA
@@ -550,7 +550,7 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte
 **      this means VSYNC line is not connected in the hardware.
 **      (check soldering pcb and pins)
 **      The same behaviour of missing VSYNC can be duplicated on budget
-**      cards, by seting DD1_INIT trigger mode 7 in 3rd nibble.
+**      cards, by setting DD1_INIT trigger mode 7 in 3rd nibble.
 */
 
        // Setup RPS1 "program" (p35)
index bf267552941fb78cecdb770ec7671f39788e420b..b8fde5cf4735567919c3dfa19e79ca99940018d2 100644 (file)
@@ -24,7 +24,7 @@ config VIDEO_HELPER_CHIPS_AUTO
          decode audio/video standards. This option will autoselect
          all pertinent modules to each selected video module.
 
-         Unselect this only if you know exaclty what you are doing, since
+         Unselect this only if you know exactly what you are doing, since
          it may break support on some boards.
 
          In doubt, say Y.
index 46c1148308843a4d8ed3e0db02d6f20fd8f73c76..e8db6e58d390167006810e2fc233547527bd5b90 100644 (file)
@@ -1095,8 +1095,7 @@ static int pwc_video_open(struct inode *inode, struct file *file)
        PWC_DEBUG_OPEN(">> video_open called(vdev = 0x%p).\n", vdev);
 
        pdev = (struct pwc_device *)vdev->priv;
-       if (pdev == NULL)
-               BUG();
+       BUG_ON(!pdev);
        if (pdev->vopen) {
                PWC_DEBUG_OPEN("I'm busy, someone is using the device.\n");
                return -EBUSY;
index e5c72719debc70496596980d67213ea3dd08770f..051b7c5b8f03a6da69bef8edde3488f841638b46 100644 (file)
@@ -6185,7 +6185,7 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info)
                "Abort",                                        /* 12h */
                "IO Not Yet Executed",                          /* 13h */
                "IO Executed",                                  /* 14h */
-               "Persistant Reservation Out Not Affiliation Owner", /* 15h */
+               "Persistent Reservation Out Not Affiliation Owner", /* 15h */
                "Open Transmit DMA Abort",                      /* 16h */
                "IO Device Missing Delay Retry",                /* 17h */
                NULL,                                           /* 18h */
index 4ccdd82b680f8f22ed78e27a89a7d9c418df859a..61a1de85cb23c96f83134c7672bd63f693e91e85 100644 (file)
@@ -130,8 +130,8 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
        u64 limit = BLK_BOUNCE_HIGH;
        int ret;
 
-       if (host->dev->dma_mask && *host->dev->dma_mask)
-               limit = *host->dev->dma_mask;
+       if (mmc_dev(host)->dma_mask && *mmc_dev(host)->dma_mask)
+               limit = *mmc_dev(host)->dma_mask;
 
        mq->card = card;
        mq->queue = blk_init_queue(mmc_request, lock);
index 10cc9734eaa0ea56187259b2947bf7d42931c9bf..ac53296360453c6067f6c565ee0b2857b7fc049d 100644 (file)
@@ -199,7 +199,7 @@ void mmc_init_card(struct mmc_card *card, struct mmc_host *host)
        memset(card, 0, sizeof(struct mmc_card));
        card->host = host;
        device_initialize(&card->dev);
-       card->dev.parent = card->host->dev;
+       card->dev.parent = mmc_dev(host);
        card->dev.bus = &mmc_bus_type;
        card->dev.release = mmc_release_card;
 }
@@ -242,7 +242,7 @@ void mmc_remove_card(struct mmc_card *card)
 }
 
 
-static void mmc_host_classdev_release(struct class_device *dev)
+static void mmc_host_classdev_release(struct device *dev)
 {
        struct mmc_host *host = cls_dev_to_mmc_host(dev);
        kfree(host);
@@ -250,7 +250,7 @@ static void mmc_host_classdev_release(struct class_device *dev)
 
 static struct class mmc_host_class = {
        .name           = "mmc_host",
-       .release        = mmc_host_classdev_release,
+       .dev_release    = mmc_host_classdev_release,
 };
 
 static DEFINE_IDR(mmc_host_idr);
@@ -267,10 +267,10 @@ struct mmc_host *mmc_alloc_host_sysfs(int extra, struct device *dev)
        if (host) {
                memset(host, 0, sizeof(struct mmc_host) + extra);
 
-               host->dev = dev;
-               host->class_dev.dev = host->dev;
+               host->parent = dev;
+               host->class_dev.parent = dev;
                host->class_dev.class = &mmc_host_class;
-               class_device_initialize(&host->class_dev);
+               device_initialize(&host->class_dev);
        }
 
        return host;
@@ -292,10 +292,10 @@ int mmc_add_host_sysfs(struct mmc_host *host)
        if (err)
                return err;
 
-       snprintf(host->class_dev.class_id, BUS_ID_SIZE,
+       snprintf(host->class_dev.bus_id, BUS_ID_SIZE,
                 "mmc%d", host->index);
 
-       return class_device_add(&host->class_dev);
+       return device_add(&host->class_dev);
 }
 
 /*
@@ -303,7 +303,7 @@ int mmc_add_host_sysfs(struct mmc_host *host)
  */
 void mmc_remove_host_sysfs(struct mmc_host *host)
 {
-       class_device_del(&host->class_dev);
+       device_del(&host->class_dev);
 
        spin_lock(&mmc_host_lock);
        idr_remove(&mmc_host_idr, host->index);
@@ -315,7 +315,7 @@ void mmc_remove_host_sysfs(struct mmc_host *host)
  */
 void mmc_free_host_sysfs(struct mmc_host *host)
 {
-       class_device_put(&host->class_dev);
+       put_device(&host->class_dev);
 }
 
 static struct workqueue_struct *workqueue;
index 762fa28958918fbd21770a574f035a725bb14bd5..d593ef342e759f1a551e8303d250f981fd5f4fd6 100644 (file)
@@ -640,8 +640,7 @@ mmc_omap_prepare_dma(struct mmc_omap_host *host, struct mmc_data *data)
        }
 
        /* Max limit for DMA frame count is 0xffff */
-       if (unlikely(count > 0xffff))
-               BUG();
+       BUG_ON(count > 0xffff);
 
        OMAP_MMC_WRITE(host->base, BUF, buf);
        omap_set_dma_transfer_params(dma_ch, OMAP_DMA_DATA_TYPE_S16,
index ced309b37a8f94900a3567b1aa3a826b07f06b2f..682e62b0b09db65d0539742f3f7c804dc0aaba82 100644 (file)
@@ -1488,7 +1488,7 @@ static void __devinit wbsd_request_dma(struct wbsd_host *host, int dma)
        /*
         * Translate the address to a physical address.
         */
-       host->dma_addr = dma_map_single(host->mmc->dev, host->dma_buffer,
+       host->dma_addr = dma_map_single(mmc_dev(host->mmc), host->dma_buffer,
                WBSD_DMA_SIZE, DMA_BIDIRECTIONAL);
 
        /*
@@ -1512,7 +1512,7 @@ kfree:
         */
        BUG_ON(1);
 
-       dma_unmap_single(host->mmc->dev, host->dma_addr,
+       dma_unmap_single(mmc_dev(host->mmc), host->dma_addr,
                WBSD_DMA_SIZE, DMA_BIDIRECTIONAL);
        host->dma_addr = (dma_addr_t)NULL;
 
@@ -1530,7 +1530,7 @@ err:
 static void __devexit wbsd_release_dma(struct wbsd_host *host)
 {
        if (host->dma_addr) {
-               dma_unmap_single(host->mmc->dev, host->dma_addr,
+               dma_unmap_single(mmc_dev(host->mmc), host->dma_addr,
                        WBSD_DMA_SIZE, DMA_BIDIRECTIONAL);
        }
        kfree(host->dma_buffer);
index 24747bdc3e19fd85ab2c6fe03a8352e78a6ec966..d132ed571f1398d8ec8fb35f6c126c6aafd5f717 100644 (file)
@@ -607,7 +607,7 @@ config MTD_BAST_MAXSIZE
        default "4"
 
 config MTD_SHARP_SL
-       bool "ROM maped on Sharp SL Series"
+       bool "ROM mapped on Sharp SL Series"
        depends on MTD && ARCH_PXA
        help
          This enables access to the flash chip on the Sharp SL Series of PDAs.
index 92b5d883d7b0e4f8b4ad978a6fac2a9c44c2bfc4..65e5ee552010be7a4c147a34f806ac3d9a5e46d0 100644 (file)
@@ -80,7 +80,7 @@ struct mtd_partition flagadm_parts[] = {
                .size =         FLASH_PARTITION2_SIZE
        },
        {
-               .name =         "Persistant storage",
+               .name =         "Persistent storage",
                .offset =       FLASH_PARTITION3_ADDR,
                .size =         FLASH_PARTITION3_SIZE
        }
index 6e863aa9894c9ed4af4e89d9a56be08f3a00a541..b6c70c58ae99d4af1e5c832cc74f5bcc8834c7f2 100644 (file)
@@ -32,7 +32,7 @@ config IFB
        tristate "Intermediate Functional Block support"
        depends on NET_CLS_ACT
        ---help---
-         This is an intermidiate driver that allows sharing of
+         This is an intermediate driver that allows sharing of
          resources.
          To compile this driver as a module, choose M here: the module
          will be called ifb.  If you want to use more than one ifb
@@ -2136,7 +2136,7 @@ config SK98LIN
          This driver supports the original Yukon chipset. A cleaner driver is 
          also available (skge) which seems to work better than this one.
 
-         This driver does not support the newer Yukon2 chipset. A seperate
+         This driver does not support the newer Yukon2 chipset. A separate
          driver, sky2, is provided to support Yukon2-based adapters.
 
          The following adapters are supported by this driver:
index 19ab3441269c39133fe12b2c39743262eeefbce3..3a8df479cbdad660351a676b54912074fb597062 100644 (file)
@@ -1215,7 +1215,7 @@ static void e100_setup_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb
 *  the literal in the instruction before the code is loaded, the
 *  driver can change the algorithm.
 *
-*  INTDELAY - This loads the dead-man timer with its inital value.
+*  INTDELAY - This loads the dead-man timer with its initial value.
 *    When this timer expires the interrupt is asserted, and the
 *    timer is reset each time a new packet is received.  (see
 *    BUNDLEMAX below to set the limit on number of chained packets)
index 65077f39da69970e7e51b6854febb8998f8f527e..796c4f7d4260da900321bc5452ff4c5a5a72c707 100644 (file)
@@ -3868,7 +3868,7 @@ e1000_phy_hw_reset(struct e1000_hw *hw)
 *
 * hw - Struct containing variables accessed by shared code
 *
-* Sets bit 15 of the MII Control regiser
+* Sets bit 15 of the MII Control register
 ******************************************************************************/
 int32_t
 e1000_phy_reset(struct e1000_hw *hw)
index b79ec0d7480fa9c411fd723cb93b13c5a47f344b..ecb61f876f27709cd63098c6e9a62a924b7401a2 100644 (file)
@@ -61,8 +61,8 @@ config FIXED_PHY
        depends on PHYLIB
        ---help---
          Adds the driver to PHY layer to cover the boards that do not have any PHY bound,
-         but with the ability to manipulate with speed/link in software. The relavant MII
-         speed/duplex parameters could be effectively handled in user-specified  fuction.
+         but with the ability to manipulate the speed/link in software. The relevant MII
+         speed/duplex parameters could be effectively handled in a user-specified function.
          Currently tested with mpc866ads.
 
 config FIXED_MII_10_FDX
index f5802e7b08e9dcfaff1e3b077fb75e478fb2a849..c6de566188e4d6db66667b1855031d90b9dc8524 100644 (file)
@@ -860,7 +860,7 @@ static int __init ppp_init(void)
                        err = PTR_ERR(ppp_class);
                        goto out_chrdev;
                }
-               class_device_create(ppp_class, NULL, MKDEV(PPP_MAJOR, 0), NULL, "ppp");
+               device_create(ppp_class, NULL, MKDEV(PPP_MAJOR, 0), "ppp");
        }
 
 out:
@@ -2675,7 +2675,7 @@ static void __exit ppp_cleanup(void)
        cardmap_destroy(&all_ppp_units);
        if (unregister_chrdev(PPP_MAJOR, "ppp") != 0)
                printk(KERN_ERR "PPP: failed to unregister PPP device\n");
-       class_device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0));
+       device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0));
        class_destroy(ppp_class);
 }
 
index 778d9e618ebd545b3349fffca86369b99c65a36d..3fa67171e832fdfa6a6f3c0aea855b771a426ce3 100644 (file)
@@ -160,7 +160,7 @@ struct s_IOCTL {
 
 /*
 ** Interim definition of SK_DRV_TIMER placed in this file until 
-** common modules have boon finallized
+** common modules have been finalized
 */
 #define SK_DRV_TIMER                   11 
 #define        SK_DRV_MODERATION_TIMER         1
index 07c1b4c8699d3b8c7675988c66e3d90ab86a0682..37ce03fb8de32932b964952236426b8a8c4eb231 100644 (file)
@@ -252,7 +252,7 @@ SkDimEnableModerationIfNeeded(SK_AC *pAC) {
 
 /*******************************************************************************
 ** Function     : SkDimDisplayModerationSettings
-** Description  : Displays the current settings regaring interrupt moderation
+** Description  : Displays the current settings regarding interrupt moderation
 ** Programmer   : Ralph Roesler
 ** Last Modified: 22-mar-03
 ** Returns      : void (!)
@@ -510,7 +510,7 @@ EnableIntMod(SK_AC *pAC) {
 
 /*******************************************************************************
 ** Function     : DisableIntMod()
-** Description  : Disbles the interrupt moderation independent of what inter-
+** Description  : Disables the interrupt moderation independent of what inter-
 **                rupts are running or not
 ** Programmer   : Ralph Roesler
 ** Last Modified: 23-mar-03
index 1f742814a01c295dff243a964fa9c64485b582b2..72120d5c2f7bd579fd7f210e8e02157cf50787f2 100644 (file)
@@ -6920,8 +6920,8 @@ static int ipw_qos_association(struct ipw_priv *priv,
 }
 
 /*
-* handling the beaconing responces. if we get different QoS setting
-* of the network from the the associated setting adjust the QoS
+* handling the beaconing responses. if we get different QoS setting
+* off the network from the associated setting, adjust the QoS
 * setting
 */
 static int ipw_qos_association_resp(struct ipw_priv *priv,
index 68cb3a080050d78d47bc787dd47366c5057c3c5f..fe3f5f5365c555abdef1546e7e0868b79bc8bea3 100644 (file)
@@ -486,7 +486,7 @@ typedef unsigned long space_t;
 **   This bit tells U2 to do R/M/W for partial cachelines. "Streaming"
 **   data can avoid this if the mapping covers full cache lines.
 ** o STOP_MOST is needed for atomicity across cachelines.
-**   Apperently only "some EISA devices" need this.
+**   Apparently only "some EISA devices" need this.
 **   Using CONFIG_ISA is hack. Only the IOA with EISA under it needs
 **   to use this hint iff the EISA devices needs this feature.
 **   According to the U2 ERS, STOP_MOST enabled pages hurt performance.
index c2949b4367e51b5c632ee765c7b799b2f6ba1211..12bab64a62a15da1d1f853a0fa203cc268c6d311 100644 (file)
 **
 ** PA Firmware
 ** -----------
-** PA-RISC platforms have two fundementally different types of firmware.
+** PA-RISC platforms have two fundamentally different types of firmware.
 ** For PCI devices, "Legacy" PDC initializes the "INTERRUPT_LINE" register
 ** and BARs similar to a traditional PC BIOS.
 ** The newer "PAT" firmware supports PDC calls which return tables.
-** PAT firmware only initializes PCI Console and Boot interface.
-** With these tables, the OS can progam all other PCI devices.
+** PAT firmware only initializes the PCI Console and Boot interface.
+** With these tables, the OS can program all other PCI devices.
 **
 ** One such PAT PDC call returns the "Interrupt Routing Table" (IRT).
 ** The IRT maps each PCI slot's INTA-D "output" line to an I/O SAPIC
index ecc50db8585ab287a9e25ca316f039a8546eef1e..f1dd81a1d592eabe12865903211f6d2e5e0b9c95 100644 (file)
@@ -27,14 +27,14 @@ config PCI_MULTITHREAD_PROBE
          smaller speedup on single processor machines.
 
          But it can also cause lots of bad things to happen.  A number
-         of PCI drivers can not properly handle running in this way,
+         of PCI drivers cannot properly handle running in this way,
          some will just not work properly at all, while others might
          decide to blow up power supplies with a huge load all at once,
          so use this option at your own risk.
 
          It is very unwise to use this option if you are not using a
          boot process that can handle devices being created in any
-         order.  A program that can create persistant block and network
+         order.  A program that can create persistent block and network
          device names (like udev) is a good idea if you wish to use
          this option.
 
index c3ac98a0a6a608b94cfdae4bc2baa1bfd37db881..f55ac3885cb3fa98bf6ae632514edb7f2749c2e2 100644 (file)
@@ -531,7 +531,7 @@ static u8 hpc_readcmdtoindex (u8 cmd, u8 index)
 *
 * Action:  issue a READ command to HPC
 *
-* Input:   pslot   - can not be NULL for READ_ALLSTAT
+* Input:   pslot   - cannot be NULL for READ_ALLSTAT
 *          pstatus - can be NULL for READ_ALLSTAT
 *
 * Return   0 or error codes
index 969be465309c2a266a0f6f317d169ef8555bd5f0..1ee9a6f06541e93b3f67af32295bb0879b97d5eb 100644 (file)
@@ -29,7 +29,7 @@
 #define CLAW_COMPLETE           0xff   /* flag to indicate i/o completed */
 
 /*-----------------------------------------------------*
-*     CLAW control comand code                         *
+*     CLAW control command code                        *
 *------------------------------------------------------*/
 
 #define SYSTEM_VALIDATE_REQUEST   0x01  /* System Validate request */
index b79f45f3ad47dff7a300a8bb3aab192092a3449a..a11f4e6d8bd93698260a7c574deda49bfb325d5e 100644 (file)
  * The host accesses this scratch in a different manner from the
  * central sequencer. The sequencer has to use CSEQ registers CSCRPAGE
  * and CMnSCRPAGE to access the scratch memory. A flat mapping of the
- * scratch memory is avaliable for software convenience and to prevent
+ * scratch memory is available for software convenience and to prevent
  * corruption while the sequencer is running. This memory is mapped
  * onto addresses 800h - BFFh, total of 400h bytes.
  *
index de7c04d4254d50a7eb07a90de89d28ef43aba2f4..e5a0ec37e9544caf9703be97d618e7ab2a7c23be 100644 (file)
@@ -64,7 +64,7 @@ struct asd_ocm_dir {
 
 #define OCM_INIT_DIR_ENTRIES   5
 /***************************************************************************
-*  OCM dircetory default
+*  OCM directory default
 ***************************************************************************/
 static struct asd_ocm_dir OCMDirInit =
 {
@@ -73,7 +73,7 @@ static struct asd_ocm_dir OCMDirInit =
 };
 
 /***************************************************************************
-*  OCM dircetory Entries default
+*  OCM directory Entries default
 ***************************************************************************/
 static struct asd_ocm_dir_ent OCMDirEntriesInit[OCM_INIT_DIR_ENTRIES] =
 {
index 6cc2bc2f62be8f1c22a41183c4f532a865bad23f..adb8eb4f5fd1a566a484f63dcf2bcf1a9ed8cfd0 100644 (file)
@@ -185,7 +185,7 @@ static inline struct list_head *ncr_list_pop(struct list_head *head)
 **     power of 2 cache line size.
 **     Enhanced in linux-2.3.44 to provide a memory pool 
 **     per pcidev to support dynamic dma mapping. (I would 
-**     have preferred a real bus astraction, btw).
+**     have preferred a real bus abstraction, btw).
 **
 **==========================================================
 */
@@ -1438,7 +1438,7 @@ struct head {
 **     The first four bytes (scr_st[4]) are used inside the script by 
 **     "COPY" commands.
 **     Because source and destination must have the same alignment
-**     in a DWORD, the fields HAVE to be at the choosen offsets.
+**     in a DWORD, the fields HAVE to be at the chosen offsets.
 **             xerr_st         0       (0x34)  scratcha
 **             sync_st         1       (0x05)  sxfer
 **             wide_st         3       (0x03)  scntl3
@@ -1498,7 +1498,7 @@ struct head {
 **     the DSA (data structure address) register points
 **     to this substructure of the ccb.
 **     This substructure contains the header with
-**     the script-processor-changable data and
+**     the script-processor-changeable data and
 **     data blocks for the indirect move commands.
 **
 **----------------------------------------------------------
@@ -5107,7 +5107,7 @@ void ncr_complete (struct ncb *np, struct ccb *cp)
 
 /*
 **     This CCB has been skipped by the NCR.
-**     Queue it in the correponding unit queue.
+**     Queue it in the corresponding unit queue.
 */
 static void ncr_ccb_skipped(struct ncb *np, struct ccb *cp)
 {
@@ -5896,8 +5896,8 @@ static void ncr_log_hard_error(struct ncb *np, u16 sist, u_char dstat)
 **
 **     In normal cases, interrupt conditions occur one at a 
 **     time. The ncr is able to stack in some extra registers 
-**     other interrupts that will occurs after the first one.
-**     But severall interrupts may occur at the same time.
+**     other interrupts that will occur after the first one.
+**     But, several interrupts may occur at the same time.
 **
 **     We probably should only try to deal with the normal 
 **     case, but it seems that multiple interrupts occur in 
@@ -6796,7 +6796,7 @@ void ncr_int_sir (struct ncb *np)
 **     The host status field is set to HS_NEGOTIATE to mark this
 **     situation.
 **
-**     If the target doesn't answer this message immidiately
+**     If the target doesn't answer this message immediately
 **     (as required by the standard), the SIR_NEGO_FAIL interrupt
 **     will be raised eventually.
 **     The handler removes the HS_NEGOTIATE status, and sets the
index cb8b7701431ef855d8b7ba656b761412306385ae..b39357d9af8d1bcb82ab063e39784d2ef84bfe18 100644 (file)
 **     Same as option 1, but also deal with 
 **     misconfigured interrupts.
 **
-**     - Edge triggerred instead of level sensitive.
+**     - Edge triggered instead of level sensitive.
 **     - No interrupt line connected.
 **     - IRQ number misconfigured.
 **     
@@ -549,7 +549,7 @@ struct ncr_driver_setup {
 
 /*
 **     Initial setup.
-**     Can be overriden at startup by a command line.
+**     Can be overridden at startup by a command line.
 */
 #define SCSI_NCR_DRIVER_SETUP                  \
 {                                              \
@@ -1093,7 +1093,7 @@ struct scr_tblsel {
 **-----------------------------------------------------------
 **     On 810A, 860, 825A, 875, 895 and 896 chips the content 
 **     of SFBR register can be used as data (SCR_SFBR_DATA).
-**     The 896 has additionnal IO registers starting at 
+**     The 896 has additional IO registers starting at 
 **     offset 0x80. Bit 7 of register offset is stored in 
 **     bit 7 of the SCRIPTS instruction first DWORD.
 **-----------------------------------------------------------
index 23334c8bc4c75e5c29fcf2415267d3c00397425c..d895a1adb428fbb10b32977e6a200a649766ec55 100644 (file)
@@ -16,7 +16,7 @@ config SPI
          controller and a chipselect.  Most SPI slaves don't support
          dynamic device discovery; some are even write-only or read-only.
 
-         SPI is widely used by microcontollers to talk with sensors,
+         SPI is widely used by microcontrollers to talk with sensors,
          eeprom and flash memory, codecs and various other controller
          chips, analog to digital (and d-to-a) converters, and more.
          MMC and SD cards can be accessed using SPI protocol; and for
index cf10cbc98f8089885ab3174ceb09e56c369aa543..cc60759083bf9ec9cd3d8a6e26f21d716e56b974 100644 (file)
@@ -153,7 +153,7 @@ config USB_U132_HCD
          adapter will *NOT* work with PC cards that do not contain an OHCI
          controller.
 
-         For those PC cards that contain multiple OHCI controllers only ther
+         For those PC cards that contain multiple OHCI controllers only the
          first one is used.
 
          The driver consists of two modules, the "ftdi-elan" module is a
index 32c635ecbf314cd6e3984c514753675ef7480887..a00d1595656cb0ae4f4f960a2c39e908c90a593d 100644 (file)
@@ -211,7 +211,7 @@ int usb_ftdi_elan_read_pcimem(struct platform_device *pdev, u8 addressofs,
 int usb_ftdi_elan_write_pcimem(struct platform_device *pdev, u8 addressofs,
         u8 width, u32 data);
 /*
-* these can not be inlines because we need the structure offset!!
+* these cannot be inlines because we need the structure offset!!
 * Does anyone have a better way?????
 */
 #define u132_read_pcimem(u132, member, data) \
@@ -3045,7 +3045,7 @@ static struct hc_driver u132_hc_driver = {
 * This function may be called by the USB core whilst the "usb_all_devices_rwsem"
 * is held for writing, thus this module must not call usb_remove_hcd()
 * synchronously - but instead should immediately stop activity to the
-* device and ansynchronously call usb_remove_hcd()
+* device and asynchronously call usb_remove_hcd()
 */
 static int __devexit u132_remove(struct platform_device *pdev)
 {
@@ -3241,7 +3241,7 @@ static int u132_resume(struct platform_device *pdev)
 #define u132_resume NULL
 #endif
 /*
-* this driver is loaded explicitely by ftdi_u132
+* this driver is loaded explicitly by ftdi_u132
 *
 * the platform_driver struct is static because it is per type of module
 */
index 551ba8906d626ea8080daa2fac1ea59f2c355239..5b5a3e621daa9dac7791ce32151a8b47726903c6 100644 (file)
@@ -52,7 +52,7 @@
 * the kernel to load the "u132-hcd" module.
 *
 * The "ftdi-u132" module provides the interface to the inserted
-* PC card and the "u132-hcd" module uses the API to send and recieve
+* PC card and the "u132-hcd" module uses the API to send and receive
 * data. The API features call-backs, so that part of the "u132-hcd"
 * module code will run in the context of one of the kernel threads
 * of the "ftdi-u132" module.
index bdb58100fc1dd11fdfaed773326b795b4014858b..5e3ac281a2f8798515a08d0f083103effa070b53 100644 (file)
 *       to TASK_RUNNING will be lost and write_chan's subsequent call to
 *       schedule() will never return (unless it catches a signal).
 *       This race condition occurs because write_bulk_callback() (and thus
-*       the wakeup) are called asynchonously from an interrupt, rather than
+*       the wakeup) are called asynchronously from an interrupt, rather than
 *       from the scheduler.  We can avoid the race by calling the wakeup
 *       from the scheduler queue and that's our fix:  Now, at the end of
 *       write_bulk_callback() we queue up a wakeup call on the scheduler
index 93ffcdd95f5026fd467116553b5c1335f872d89d..e973a87fbb01b02634732a7606bf837a96d9a4c2 100644 (file)
@@ -1296,14 +1296,14 @@ register_framebuffer(struct fb_info *fb_info)
                        break;
        fb_info->node = i;
 
-       fb_info->class_device = class_device_create(fb_class, NULL, MKDEV(FB_MAJOR, i),
-                                   fb_info->device, "fb%d", i);
-       if (IS_ERR(fb_info->class_device)) {
+       fb_info->dev = device_create(fb_class, fb_info->device,
+                                    MKDEV(FB_MAJOR, i), "fb%d", i);
+       if (IS_ERR(fb_info->dev)) {
                /* Not fatal */
-               printk(KERN_WARNING "Unable to create class_device for framebuffer %d; errno = %ld\n", i, PTR_ERR(fb_info->class_device));
-               fb_info->class_device = NULL;
+               printk(KERN_WARNING "Unable to create device for framebuffer %d; errno = %ld\n", i, PTR_ERR(fb_info->dev));
+               fb_info->dev = NULL;
        } else
-               fb_init_class_device(fb_info);
+               fb_init_device(fb_info);
 
        if (fb_info->pixmap.addr == NULL) {
                fb_info->pixmap.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL);
@@ -1356,8 +1356,8 @@ unregister_framebuffer(struct fb_info *fb_info)
        fb_destroy_modelist(&fb_info->modelist);
        registered_fb[i]=NULL;
        num_registered_fb--;
-       fb_cleanup_class_device(fb_info);
-       class_device_destroy(fb_class, MKDEV(FB_MAJOR, i));
+       fb_cleanup_device(fb_info);
+       device_destroy(fb_class, MKDEV(FB_MAJOR, i));
        event.info = fb_info;
        fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event);
        return 0;
index d3a50417ed9a6ab09d16841e435597bf8f6da312..323bdf6fc7d5c10ae1360aadf8a904f4c92a52c5 100644 (file)
@@ -73,7 +73,7 @@ EXPORT_SYMBOL(framebuffer_alloc);
  *
  * @info: frame buffer info structure
  *
- * Drop the reference count of the class_device embedded in the
+ * Drop the reference count of the device embedded in the
  * framebuffer info structure.
  *
  */
@@ -120,10 +120,10 @@ static int mode_string(char *buf, unsigned int offset,
                        m, mode->xres, mode->yres, v, mode->refresh);
 }
 
-static ssize_t store_mode(struct class_device *class_device, const char * buf,
-                         size_t count)
+static ssize_t store_mode(struct device *device, struct device_attribute *attr,
+                         const char *buf, size_t count)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        char mstr[100];
        struct fb_var_screeninfo var;
        struct fb_modelist *modelist;
@@ -151,9 +151,10 @@ static ssize_t store_mode(struct class_device *class_device, const char * buf,
        return -EINVAL;
 }
 
-static ssize_t show_mode(struct class_device *class_device, char *buf)
+static ssize_t show_mode(struct device *device, struct device_attribute *attr,
+                        char *buf)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
 
        if (!fb_info->mode)
                return 0;
@@ -161,10 +162,11 @@ static ssize_t show_mode(struct class_device *class_device, char *buf)
        return mode_string(buf, 0, fb_info->mode);
 }
 
-static ssize_t store_modes(struct class_device *class_device, const char * buf,
-                          size_t count)
+static ssize_t store_modes(struct device *device,
+                          struct device_attribute *attr,
+                          const char *buf, size_t count)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        LIST_HEAD(old_list);
        int i = count / sizeof(struct fb_videomode);
 
@@ -186,9 +188,10 @@ static ssize_t store_modes(struct class_device *class_device, const char * buf,
        return 0;
 }
 
-static ssize_t show_modes(struct class_device *class_device, char *buf)
+static ssize_t show_modes(struct device *device, struct device_attribute *attr,
+                         char *buf)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        unsigned int i;
        struct list_head *pos;
        struct fb_modelist *modelist;
@@ -203,10 +206,10 @@ static ssize_t show_modes(struct class_device *class_device, char *buf)
        return i;
 }
 
-static ssize_t store_bpp(struct class_device *class_device, const char * buf,
-                        size_t count)
+static ssize_t store_bpp(struct device *device, struct device_attribute *attr,
+                        const char *buf, size_t count)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        struct fb_var_screeninfo var;
        char ** last = NULL;
        int err;
@@ -218,16 +221,18 @@ static ssize_t store_bpp(struct class_device *class_device, const char * buf,
        return count;
 }
 
-static ssize_t show_bpp(struct class_device *class_device, char *buf)
+static ssize_t show_bpp(struct device *device, struct device_attribute *attr,
+                       char *buf)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->var.bits_per_pixel);
 }
 
-static ssize_t store_rotate(struct class_device *class_device, const char *buf,
-                           size_t count)
+static ssize_t store_rotate(struct device *device,
+                           struct device_attribute *attr,
+                           const char *buf, size_t count)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        struct fb_var_screeninfo var;
        char **last = NULL;
        int err;
@@ -242,17 +247,19 @@ static ssize_t store_rotate(struct class_device *class_device, const char *buf,
 }
 
 
-static ssize_t show_rotate(struct class_device *class_device, char *buf)
+static ssize_t show_rotate(struct device *device,
+                          struct device_attribute *attr, char *buf)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
 
        return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->var.rotate);
 }
 
-static ssize_t store_virtual(struct class_device *class_device,
-                            const char * buf, size_t count)
+static ssize_t store_virtual(struct device *device,
+                            struct device_attribute *attr,
+                            const char *buf, size_t count)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        struct fb_var_screeninfo var;
        char *last = NULL;
        int err;
@@ -269,23 +276,26 @@ static ssize_t store_virtual(struct class_device *class_device,
        return count;
 }
 
-static ssize_t show_virtual(struct class_device *class_device, char *buf)
+static ssize_t show_virtual(struct device *device,
+                           struct device_attribute *attr, char *buf)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        return snprintf(buf, PAGE_SIZE, "%d,%d\n", fb_info->var.xres_virtual,
                        fb_info->var.yres_virtual);
 }
 
-static ssize_t show_stride(struct class_device *class_device, char *buf)
+static ssize_t show_stride(struct device *device,
+                          struct device_attribute *attr, char *buf)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->fix.line_length);
 }
 
-static ssize_t store_blank(struct class_device *class_device, const char * buf,
-                          size_t count)
+static ssize_t store_blank(struct device *device,
+                          struct device_attribute *attr,
+                          const char *buf, size_t count)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        char *last = NULL;
        int err;
 
@@ -299,42 +309,48 @@ static ssize_t store_blank(struct class_device *class_device, const char * buf,
        return count;
 }
 
-static ssize_t show_blank(struct class_device *class_device, char *buf)
+static ssize_t show_blank(struct device *device,
+                         struct device_attribute *attr, char *buf)
 {
-//     struct fb_info *fb_info = class_get_devdata(class_device);
+//     struct fb_info *fb_info = dev_get_drvdata(device);
        return 0;
 }
 
-static ssize_t store_console(struct class_device *class_device,
-                            const char * buf, size_t count)
+static ssize_t store_console(struct device *device,
+                            struct device_attribute *attr,
+                            const char *buf, size_t count)
 {
-//     struct fb_info *fb_info = class_get_devdata(class_device);
+//     struct fb_info *fb_info = dev_get_drvdata(device);
        return 0;
 }
 
-static ssize_t show_console(struct class_device *class_device, char *buf)
+static ssize_t show_console(struct device *device,
+                           struct device_attribute *attr, char *buf)
 {
-//     struct fb_info *fb_info = class_get_devdata(class_device);
+//     struct fb_info *fb_info = dev_get_drvdata(device);
        return 0;
 }
 
-static ssize_t store_cursor(struct class_device *class_device,
-                           const char * buf, size_t count)
+static ssize_t store_cursor(struct device *device,
+                           struct device_attribute *attr,
+                           const char *buf, size_t count)
 {
-//     struct fb_info *fb_info = class_get_devdata(class_device);
+//     struct fb_info *fb_info = dev_get_drvdata(device);
        return 0;
 }
 
-static ssize_t show_cursor(struct class_device *class_device, char *buf)
+static ssize_t show_cursor(struct device *device,
+                          struct device_attribute *attr, char *buf)
 {
-//     struct fb_info *fb_info = class_get_devdata(class_device);
+//     struct fb_info *fb_info = dev_get_drvdata(device);
        return 0;
 }
 
-static ssize_t store_pan(struct class_device *class_device, const char * buf,
-                        size_t count)
+static ssize_t store_pan(struct device *device,
+                        struct device_attribute *attr,
+                        const char *buf, size_t count)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        struct fb_var_screeninfo var;
        char *last = NULL;
        int err;
@@ -355,24 +371,27 @@ static ssize_t store_pan(struct class_device *class_device, const char * buf,
        return count;
 }
 
-static ssize_t show_pan(struct class_device *class_device, char *buf)
+static ssize_t show_pan(struct device *device,
+                       struct device_attribute *attr, char *buf)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        return snprintf(buf, PAGE_SIZE, "%d,%d\n", fb_info->var.xoffset,
                        fb_info->var.xoffset);
 }
 
-static ssize_t show_name(struct class_device *class_device, char *buf)
+static ssize_t show_name(struct device *device,
+                        struct device_attribute *attr, char *buf)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
 
        return snprintf(buf, PAGE_SIZE, "%s\n", fb_info->fix.id);
 }
 
-static ssize_t store_fbstate(struct class_device *class_device,
-                       const char *buf, size_t count)
+static ssize_t store_fbstate(struct device *device,
+                            struct device_attribute *attr,
+                            const char *buf, size_t count)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        u32 state;
        char *last = NULL;
 
@@ -385,17 +404,19 @@ static ssize_t store_fbstate(struct class_device *class_device,
        return count;
 }
 
-static ssize_t show_fbstate(struct class_device *class_device, char *buf)
+static ssize_t show_fbstate(struct device *device,
+                           struct device_attribute *attr, char *buf)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->state);
 }
 
 #ifdef CONFIG_FB_BACKLIGHT
-static ssize_t store_bl_curve(struct class_device *class_device,
-               const char *buf, size_t count)
+static ssize_t store_bl_curve(struct device *device,
+                             struct device_attribute *attr,
+                             const char *buf, size_t count)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        u8 tmp_curve[FB_BACKLIGHT_LEVELS];
        unsigned int i;
 
@@ -432,9 +453,10 @@ static ssize_t store_bl_curve(struct class_device *class_device,
        return count;
 }
 
-static ssize_t show_bl_curve(struct class_device *class_device, char *buf)
+static ssize_t show_bl_curve(struct device *device,
+                            struct device_attribute *attr, char *buf)
 {
-       struct fb_info *fb_info = class_get_devdata(class_device);
+       struct fb_info *fb_info = dev_get_drvdata(device);
        ssize_t len = 0;
        unsigned int i;
 
@@ -465,7 +487,7 @@ static ssize_t show_bl_curve(struct class_device *class_device, char *buf)
 /* When cmap is added back in it should be a binary attribute
  * not a text one. Consideration should also be given to converting
  * fbdev to use configfs instead of sysfs */
-static struct class_device_attribute class_device_attrs[] = {
+static struct device_attribute device_attrs[] = {
        __ATTR(bits_per_pixel, S_IRUGO|S_IWUSR, show_bpp, store_bpp),
        __ATTR(blank, S_IRUGO|S_IWUSR, show_blank, store_blank),
        __ATTR(console, S_IRUGO|S_IWUSR, show_console, store_console),
@@ -483,17 +505,16 @@ static struct class_device_attribute class_device_attrs[] = {
 #endif
 };
 
-int fb_init_class_device(struct fb_info *fb_info)
+int fb_init_device(struct fb_info *fb_info)
 {
        int i, error = 0;
 
-       class_set_devdata(fb_info->class_device, fb_info);
+       dev_set_drvdata(fb_info->dev, fb_info);
 
        fb_info->class_flag |= FB_SYSFS_FLAG_ATTR;
 
-       for (i = 0; i < ARRAY_SIZE(class_device_attrs); i++) {
-               error = class_device_create_file(fb_info->class_device,
-                                                &class_device_attrs[i]);
+       for (i = 0; i < ARRAY_SIZE(device_attrs); i++) {
+               error = device_create_file(fb_info->dev, &device_attrs[i]);
 
                if (error)
                        break;
@@ -501,22 +522,20 @@ int fb_init_class_device(struct fb_info *fb_info)
 
        if (error) {
                while (--i >= 0)
-                       class_device_remove_file(fb_info->class_device,
-                                                &class_device_attrs[i]);
+                       device_remove_file(fb_info->dev, &device_attrs[i]);
                fb_info->class_flag &= ~FB_SYSFS_FLAG_ATTR;
        }
 
        return 0;
 }
 
-void fb_cleanup_class_device(struct fb_info *fb_info)
+void fb_cleanup_device(struct fb_info *fb_info)
 {
        unsigned int i;
 
        if (fb_info->class_flag & FB_SYSFS_FLAG_ATTR) {
-               for (i = 0; i < ARRAY_SIZE(class_device_attrs); i++)
-                       class_device_remove_file(fb_info->class_device,
-                                                &class_device_attrs[i]);
+               for (i = 0; i < ARRAY_SIZE(device_attrs); i++)
+                       device_remove_file(fb_info->dev, &device_attrs[i]);
 
                fb_info->class_flag &= ~FB_SYSFS_FLAG_ATTR;
        }
index 7b1511d50b05a29df371a547a1d4db5fc756d2b7..b3b5aa0edff92198b68fb2f561fe811b559a04ae 100644 (file)
@@ -972,7 +972,7 @@ config SYSFS
 
        Some system agents rely on the information in sysfs to operate.
        /sbin/hotplug uses device and object attributes in sysfs to assist in
-       delegating policy decisions, like persistantly naming devices.
+       delegating policy decisions, like persistently naming devices.
 
        sysfs is currently used by the block subsystem to mount the root
        partition.  If sysfs is disabled you must specify the boot device on
@@ -1145,7 +1145,7 @@ config BEFS_FS
        help
          The BeOS File System (BeFS) is the native file system of Be, Inc's
          BeOS. Notable features include support for arbitrary attributes
-         on files and directories, and database-like indeces on selected
+         on files and directories, and database-like indices on selected
          attributes. (Also note that this driver doesn't make those features
          available at this time). It is a 64 bit filesystem, so it supports
          extremely large volumes and files.
index 94766599db00d3ca530eb37da388e1e63b900d35..277a5f2d18ad7b8ca66a3aef65551379054fc724 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -367,8 +367,7 @@ void fastcall __put_ioctx(struct kioctx *ctx)
 {
        unsigned nr_events = ctx->max_reqs;
 
-       if (unlikely(ctx->reqs_active))
-               BUG();
+       BUG_ON(ctx->reqs_active);
 
        cancel_delayed_work(&ctx->wq);
        flush_workqueue(aio_wq);
@@ -505,8 +504,7 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req)
        assert_spin_locked(&ctx->ctx_lock);
 
        req->ki_users --;
-       if (unlikely(req->ki_users < 0))
-               BUG();
+       BUG_ON(req->ki_users < 0);
        if (likely(req->ki_users))
                return 0;
        list_del(&req->ki_list);                /* remove from active_reqs */
index f95c8749499f9db7fe799594161a183ed9896910..aa4d09bd4e711872589b5b7a5e5ccf8b88952713 100644 (file)
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -560,10 +560,8 @@ struct bio *bio_copy_user(request_queue_t *q, unsigned long uaddr,
                        break;
                }
 
-               if (bio_add_pc_page(q, bio, page, bytes, 0) < bytes) {
-                       ret = -EINVAL;
+               if (bio_add_pc_page(q, bio, page, bytes, 0) < bytes)
                        break;
-               }
 
                len -= bytes;
        }
@@ -622,10 +620,9 @@ static struct bio *__bio_map_user_iov(request_queue_t *q,
 
                nr_pages += end - start;
                /*
-                * transfer and buffer must be aligned to at least hardsector
-                * size for now, in the future we can relax this restriction
+                * buffer must be aligned to at least hardsector size for now
                 */
-               if ((uaddr & queue_dma_alignment(q)) || (len & queue_dma_alignment(q)))
+               if (uaddr & queue_dma_alignment(q))
                        return ERR_PTR(-EINVAL);
        }
 
@@ -751,7 +748,6 @@ struct bio *bio_map_user_iov(request_queue_t *q, struct block_device *bdev,
                             int write_to_vm)
 {
        struct bio *bio;
-       int len = 0, i;
 
        bio = __bio_map_user_iov(q, bdev, iov, iov_count, write_to_vm);
 
@@ -766,18 +762,7 @@ struct bio *bio_map_user_iov(request_queue_t *q, struct block_device *bdev,
         */
        bio_get(bio);
 
-       for (i = 0; i < iov_count; i++)
-               len += iov[i].iov_len;
-
-       if (bio->bi_size == len)
-               return bio;
-
-       /*
-        * don't support partial mappings
-        */
-       bio_endio(bio, bio->bi_size, 0);
-       bio_unmap_user(bio);
-       return ERR_PTR(-EINVAL);
+       return bio;
 }
 
 static void __bio_unmap_user(struct bio *bio)
index 1ad8c9fcc742394aedee8df91ddd9bc100c3d7ed..c4fa91b8b62fb042c73df37f3a21ceadc3e840f9 100644 (file)
@@ -318,6 +318,7 @@ int cifs_get_inode_info(struct inode **pinode,
        struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
        char *tmp_path;
        char *buf = NULL;
+       int adjustTZ = FALSE;
 
        pTcon = cifs_sb->tcon;
        cFYI(1,("Getting info on %s", search_path));
@@ -348,6 +349,7 @@ int cifs_get_inode_info(struct inode **pinode,
                                        pfindData, cifs_sb->local_nls, 
                                        cifs_sb->mnt_cifs_flags &
                                          CIFS_MOUNT_MAP_SPECIAL_CHR);
+                       adjustTZ = TRUE;
                }
                
        }
@@ -444,6 +446,10 @@ int cifs_get_inode_info(struct inode **pinode,
                inode->i_ctime =
                    cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime));
                cFYI(0, ("Attributes came in as 0x%x", attr));
+               if(adjustTZ && (pTcon->ses) && (pTcon->ses->server)) {
+                       inode->i_ctime.tv_sec += pTcon->ses->server->timeAdj;
+                       inode->i_mtime.tv_sec += pTcon->ses->server->timeAdj;
+               }
 
                /* set default mode. will override for dirs below */
                if (atomic_read(&cifsInfo->inUse) == 0)
index 0bee8b7e521a2a153fa50e03bde68ec69865a364..8e259969354bced4024795fa7d6ffb0d42018db8 100644 (file)
@@ -69,17 +69,30 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode,
                        rc = -EOPNOTSUPP;  
        }
 
-/* if (!rc)     */
-       {
-               /*   renew_parental_timestamps(old_file);
-                  inode->i_nlink++;
-                  mark_inode_dirty(inode);
-                  d_instantiate(direntry, inode); */
-               /* BB add call to either mark inode dirty or refresh its data and timestamp to current time */
+       d_drop(direntry);       /* force new lookup from server of target */
+
+       /* if source file is cached (oplocked) revalidate will not go to server
+          until the file is closed or oplock broken so update nlinks locally */
+       if(old_file->d_inode) {
+               cifsInode = CIFS_I(old_file->d_inode);
+               if(rc == 0) {
+                       old_file->d_inode->i_nlink++;
+                       old_file->d_inode->i_ctime = CURRENT_TIME;
+                       /* parent dir timestamps will update from srv
+                       within a second, would it really be worth it
+                       to set the parent dir cifs inode time to zero
+                       to force revalidate (faster) for it too? */
+               }
+               /* if not oplocked will force revalidate to get info 
+                  on source file from srv */
+               cifsInode->time = 0;
+
+                /* Will update parent dir timestamps from srv within a second.
+                  Would it really be worth it to set the parent dir (cifs
+                  inode) time field to zero to force revalidate on parent
+                  directory faster ie 
+                       CIFS_I(inode)->time = 0;  */
        }
-       d_drop(direntry);       /* force new lookup from server */
-       cifsInode = CIFS_I(old_file->d_inode);
-       cifsInode->time = 0;    /* will force revalidate to go get info when needed */
 
 cifs_hl_exit:
        kfree(fromName);
index 9901928668cfe62395da77cceba9626dcac9249b..eb550b339bb829c1473f4f84ffd271b9617f954a 100644 (file)
@@ -81,7 +81,7 @@
 #define        JFS_SWAP_BYTES          0x00100000      /* running on big endian computer */
 
 /* Directory index */
-#define JFS_DIR_INDEX          0x00200000      /* Persistant index for */
+#define JFS_DIR_INDEX          0x00200000      /* Persistent index for */
                                                /* directory entries    */
 
 
index 85ce23268302931e0a23a6bd6cc2a20a36581e56..ac93174c96398a5b6cdc3a21be94026b1f375765 100644 (file)
@@ -1464,7 +1464,7 @@ static int flush_journal_list(struct super_block *s,
                }
 
                /* if someone has this block in a newer transaction, just make
-                ** sure they are commited, and don't try writing it to disk
+                ** sure they are committed, and don't try writing it to disk
                 */
                if (pjl) {
                        if (atomic_read(&pjl->j_commit_left))
@@ -3384,7 +3384,7 @@ static int remove_from_transaction(struct super_block *p_s_sb,
 
 /*
 ** for any cnode in a journal list, it can only be dirtied of all the
-** transactions that include it are commited to disk.
+** transactions that include it are committed to disk.
 ** this checks through each transaction, and returns 1 if you are allowed to dirty,
 ** and 0 if you aren't
 **
@@ -3426,7 +3426,7 @@ static int can_dirty(struct reiserfs_journal_cnode *cn)
 }
 
 /* syncs the commit blocks, but does not force the real buffers to disk
-** will wait until the current transaction is done/commited before returning 
+** will wait until the current transaction is done/committed before returning 
 */
 int journal_end_sync(struct reiserfs_transaction_handle *th,
                     struct super_block *p_s_sb, unsigned long nblocks)
index 3aa3434621ca89296b3c0b0598a663807977f1eb..a5782e8c7f07143262085dda013f62cbbd9c8ecb 100644 (file)
@@ -372,6 +372,51 @@ int sysfs_rename_dir(struct kobject * kobj, const char *new_name)
        return error;
 }
 
+int sysfs_move_dir(struct kobject *kobj, struct kobject *new_parent)
+{
+       struct dentry *old_parent_dentry, *new_parent_dentry, *new_dentry;
+       struct sysfs_dirent *new_parent_sd, *sd;
+       int error;
+
+       if (!new_parent)
+               return -EINVAL;
+
+       old_parent_dentry = kobj->parent ?
+               kobj->parent->dentry : sysfs_mount->mnt_sb->s_root;
+       new_parent_dentry = new_parent->dentry;
+
+again:
+       mutex_lock(&old_parent_dentry->d_inode->i_mutex);
+       if (!mutex_trylock(&new_parent_dentry->d_inode->i_mutex)) {
+               mutex_unlock(&old_parent_dentry->d_inode->i_mutex);
+               goto again;
+       }
+
+       new_parent_sd = new_parent_dentry->d_fsdata;
+       sd = kobj->dentry->d_fsdata;
+
+       new_dentry = lookup_one_len(kobj->name, new_parent_dentry,
+                                   strlen(kobj->name));
+       if (IS_ERR(new_dentry)) {
+               error = PTR_ERR(new_dentry);
+               goto out;
+       } else
+               error = 0;
+       d_add(new_dentry, NULL);
+       d_move(kobj->dentry, new_dentry);
+       dput(new_dentry);
+
+       /* Remove from old parent's list and insert into new parent's list. */
+       list_del_init(&sd->s_sibling);
+       list_add(&sd->s_sibling, &new_parent_sd->s_children);
+
+out:
+       mutex_unlock(&new_parent_dentry->d_inode->i_mutex);
+       mutex_unlock(&old_parent_dentry->d_inode->i_mutex);
+
+       return error;
+}
+
 static int sysfs_dir_open(struct inode *inode, struct file *file)
 {
        struct dentry * dentry = file->f_dentry;
index 298303b5a7169f37402fe45557385e0a43e0ab56..95c165101c98d16e7a6e537ff6b54a2a95b6ccc2 100644 (file)
@@ -190,6 +190,9 @@ fill_write_buffer(struct sysfs_buffer * buffer, const char __user * buf, size_t
                count = PAGE_SIZE - 1;
        error = copy_from_user(buffer->page,buf,count);
        buffer->needs_read_fill = 1;
+       /* if buf is assumed to contain a string, terminate it by \0,
+          so e.g. sscanf() can scan the string easily */
+       buffer->page[count] = 0;
        return error ? -EFAULT : count;
 }
 
index f338e40bd54477b2af0cc26ad0dd3455619d393b..fdd10953b2b6503760c91b8035b85d54243770bd 100644 (file)
@@ -357,7 +357,7 @@ struct device *acpi_get_physical_device(acpi_handle);
 /* helper */
 acpi_handle acpi_get_child(acpi_handle, acpi_integer);
 acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
-#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->firmware_data))
+#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle))
 
 #endif /* CONFIG_ACPI */
 
diff --git a/include/asm-alpha/device.h b/include/asm-alpha/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-arm/device.h b/include/asm-arm/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-arm26/device.h b/include/asm-arm26/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-avr32/device.h b/include/asm-avr32/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-cris/device.h b/include/asm-cris/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-frv/device.h b/include/asm-frv/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-generic/device.h b/include/asm-generic/device.h
new file mode 100644 (file)
index 0000000..c17c960
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#ifndef _ASM_GENERIC_DEVICE_H
+#define _ASM_GENERIC_DEVICE_H
+
+struct dev_archdata {
+};
+
+#endif /* _ASM_GENERIC_DEVICE_H */
diff --git a/include/asm-h8300/device.h b/include/asm-h8300/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-i386/device.h b/include/asm-i386/device.h
new file mode 100644 (file)
index 0000000..849604c
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#ifndef _ASM_I386_DEVICE_H
+#define _ASM_I386_DEVICE_H
+
+struct dev_archdata {
+#ifdef CONFIG_ACPI
+       void    *acpi_handle;
+#endif
+};
+
+#endif /* _ASM_I386_DEVICE_H */
diff --git a/include/asm-ia64/device.h b/include/asm-ia64/device.h
new file mode 100644 (file)
index 0000000..3db6daf
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#ifndef _ASM_IA64_DEVICE_H
+#define _ASM_IA64_DEVICE_H
+
+struct dev_archdata {
+#ifdef CONFIG_ACPI
+       void    *acpi_handle;
+#endif
+};
+
+#endif /* _ASM_IA64_DEVICE_H */
diff --git a/include/asm-m32r/device.h b/include/asm-m32r/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-m68k/device.h b/include/asm-m68k/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-m68knommu/device.h b/include/asm-m68knommu/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
index 13df9d41bd1a89ce651f2ac92289569a50224672..319899c47a2c96d1457293ba5676da554d994387 100644 (file)
@@ -37,7 +37,7 @@
 #define MCFMBUS_MFDR_MBC(a)    ((a)&0x3F)         /*M-Bus Clock*/
 
 /*
-*      Define bit flags in Controll Register
+*      Define bit flags in Control Register
 */
 
 #define MCFMBUS_MBCR_MEN           (0x80)  /* M-Bus Enable                 */
diff --git a/include/asm-mips/device.h b/include/asm-mips/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-parisc/device.h b/include/asm-parisc/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
index da2cf373e31c54af3e746e95d87d08656299b518..31ad0f05af3d4dec0a66bba5d02a118f748d5896 100644 (file)
 
 /*
 ** DMA_CHUNK_SIZE is used by the SCSI mid-layer to break up
-** (or rather not merge) DMA's into managable chunks.
+** (or rather not merge) DMAs into manageable chunks.
 ** On parisc, this is more of the software/tuning constraint
-** rather than the HW. I/O MMU allocation alogorithms can be
-** faster with smaller size is (to some degree).
+** rather than the HW. I/O MMU allocation algorithms can be
+** faster with smaller sizes (to some degree).
 */
 #define DMA_CHUNK_SIZE (BITS_PER_LONG*PAGE_SIZE)
 
index 7b8ad118d2feec1b9b307d442cbe666abdb2640e..7b3be9ac0dda3f67032f95ac5c4f8493bf6f1895 100644 (file)
@@ -149,7 +149,7 @@ extern int parisc_bus_is_phys;      /* in arch/parisc/kernel/setup.c */
 /*
 ** Most PCI devices (eg Tulip, NCR720) also export the same registers
 ** to both MMIO and I/O port space.  Due to poor performance of I/O Port
-** access under HP PCI bus adapters, strongly reccomend use of MMIO
+** access under HP PCI bus adapters, strongly recommend the use of MMIO
 ** address space.
 **
 ** While I'm at it more PA programming notes:
index 5542dd00472b8d1bb832279e522bfe8019f00535..007a880615eb80d766863f8e0b3708750c2ebbef 100644 (file)
@@ -14,7 +14,7 @@
 #endif
 
 /*
-** The number of pdir entries to "free" before issueing
+** The number of pdir entries to "free" before issuing
 ** a read to PCOM register to flush out PCOM writes.
 ** Interacts with allocation granularity (ie 4 or 8 entries
 ** allocated and free'd/purged at a time might make this
diff --git a/include/asm-powerpc/device.h b/include/asm-powerpc/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-ppc/device.h b/include/asm-ppc/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-s390/device.h b/include/asm-s390/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-sh/device.h b/include/asm-sh/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-sh64/device.h b/include/asm-sh64/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-sparc/device.h b/include/asm-sparc/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-sparc64/device.h b/include/asm-sparc64/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-um/device.h b/include/asm-um/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-v850/device.h b/include/asm-v850/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/include/asm-x86_64/device.h b/include/asm-x86_64/device.h
new file mode 100644 (file)
index 0000000..3afa03f
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#ifndef _ASM_X86_64_DEVICE_H
+#define _ASM_X86_64_DEVICE_H
+
+struct dev_archdata {
+#ifdef CONFIG_ACPI
+       void    *acpi_handle;
+#endif
+};
+
+#endif /* _ASM_X86_64_DEVICE_H */
diff --git a/include/asm-xtensa/device.h b/include/asm-xtensa/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
index 7bfcde2d557833935eab407e048c1763d194c4fd..e1c7286165ffa35c1a47e91b5b0abe56e99091ea 100644 (file)
@@ -678,10 +678,11 @@ extern void __blk_stop_queue(request_queue_t *q);
 extern void blk_run_queue(request_queue_t *);
 extern void blk_start_queueing(request_queue_t *);
 extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *);
-extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned int);
-extern int blk_rq_unmap_user(struct bio *, unsigned int);
+extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned long);
+extern int blk_rq_unmap_user(struct request *);
 extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t);
-extern int blk_rq_map_user_iov(request_queue_t *, struct request *, struct sg_iovec *, int);
+extern int blk_rq_map_user_iov(request_queue_t *, struct request *,
+                              struct sg_iovec *, int, unsigned int);
 extern int blk_execute_rq(request_queue_t *, struct gendisk *,
                          struct request *, int);
 extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *,
index b99a714fcac67adf74e85650abcfa7ecaf6ef7ab..3680ff9a30ed21b5e97450bb1f5cc811d74ecd10 100644 (file)
@@ -49,6 +49,15 @@ enum blktrace_act {
        __BLK_TA_REMAP,                 /* bio was remapped */
 };
 
+/*
+ * Notify events.
+ */
+enum blktrace_notify {
+       __BLK_TN_PROCESS = 0,           /* establish pid/name mapping */
+       __BLK_TN_TIMESTAMP,             /* include system clock */
+};
+
+
 /*
  * Trace actions in full. Additionally, read or write is masked
  */
@@ -68,6 +77,9 @@ enum blktrace_act {
 #define BLK_TA_BOUNCE          (__BLK_TA_BOUNCE)
 #define BLK_TA_REMAP           (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE))
 
+#define BLK_TN_PROCESS         (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
+#define BLK_TN_TIMESTAMP       (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
+
 #define BLK_IO_TRACE_MAGIC     0x65617400
 #define BLK_IO_TRACE_VERSION   0x07
 
index 9d4f6a9639365bd6e2483ed911ea336a9e83caa0..583a341e016cea229ad8b04d4213d59974e3cbd3 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/pm.h>
 #include <asm/semaphore.h>
 #include <asm/atomic.h>
+#include <asm/device.h>
 
 #define DEVICE_NAME_SIZE       50
 #define DEVICE_NAME_HALF       __stringify(20) /* Less than half to accommodate slop */
@@ -42,6 +43,8 @@ struct bus_type {
        struct klist            klist_devices;
        struct klist            klist_drivers;
 
+       struct blocking_notifier_head bus_notifier;
+
        struct bus_attribute    * bus_attrs;
        struct device_attribute * dev_attrs;
        struct driver_attribute * drv_attrs;
@@ -75,6 +78,29 @@ int __must_check bus_for_each_drv(struct bus_type *bus,
                struct device_driver *start, void *data,
                int (*fn)(struct device_driver *, void *));
 
+/*
+ * Bus notifiers: Get notified of addition/removal of devices
+ * and binding/unbinding of drivers to devices.
+ * In the long run, it should be a replacement for the platform
+ * notify hooks.
+ */
+struct notifier_block;
+
+extern int bus_register_notifier(struct bus_type *bus,
+                                struct notifier_block *nb);
+extern int bus_unregister_notifier(struct bus_type *bus,
+                                  struct notifier_block *nb);
+
+/* All 4 notifers below get called with the target struct device *
+ * as an argument. Note that those functions are likely to be called
+ * with the device semaphore held in the core, so be careful.
+ */
+#define BUS_NOTIFY_ADD_DEVICE          0x00000001 /* device added */
+#define BUS_NOTIFY_DEL_DEVICE          0x00000002 /* device removed */
+#define BUS_NOTIFY_BOUND_DRIVER                0x00000003 /* driver bound to device */
+#define BUS_NOTIFY_UNBIND_DRIVER       0x00000004 /* driver about to be
+                                                     unbound */
+
 /* driverfs interface for exporting bus attributes */
 
 struct bus_attribute {
@@ -343,8 +369,6 @@ struct device {
        void            *driver_data;   /* data private to the driver */
        void            *platform_data; /* Platform specific data, device
                                           core doesn't touch it */
-       void            *firmware_data; /* Firmware specific data (e.g. ACPI,
-                                          BIOS data),reserved for device core*/
        struct dev_pm_info      power;
 
        u64             *dma_mask;      /* dma mask (if dma'able device) */
@@ -358,6 +382,8 @@ struct device {
 
        struct dma_coherent_mem *dma_mem; /* internal for coherent mem
                                             override */
+       /* arch specific additions */
+       struct dev_archdata     archdata;
 
        /* class_device migration path */
        struct list_head        node;
@@ -395,7 +421,10 @@ extern int __must_check device_add(struct device * dev);
 extern void device_del(struct device * dev);
 extern int device_for_each_child(struct device *, void *,
                     int (*fn)(struct device *, void *));
+extern struct device *device_find_child(struct device *, void *data,
+                                       int (*match)(struct device *, void *));
 extern int device_rename(struct device *dev, char *new_name);
+extern int device_move(struct device *dev, struct device *new_parent);
 
 /*
  * Manual binding of a device to driver. See drivers/base/bus.c
@@ -415,8 +444,6 @@ extern struct device *device_create(struct class *cls, struct device *parent,
                                    __attribute__((format(printf,4,5)));
 extern void device_destroy(struct class *cls, dev_t devt);
 
-extern int virtual_device_parent(struct device *dev);
-
 /*
  * Platform "fixup" functions - allow the platform to have their say
  * about devices and actions that the general device layer doesn't
index 2fa9f1144228e7270ab626b2daf887ff0eb1b1b9..a24931d244046d72e056fab76f670719256de00a 100644 (file)
@@ -21,11 +21,11 @@ typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *);
 typedef int (elevator_may_queue_fn) (request_queue_t *, int);
 
 typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t);
-typedef void (elevator_put_req_fn) (request_queue_t *, struct request *);
+typedef void (elevator_put_req_fn) (struct request *);
 typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *);
 typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *);
 
-typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *);
+typedef void *(elevator_init_fn) (request_queue_t *);
 typedef void (elevator_exit_fn) (elevator_t *);
 
 struct elevator_ops
index 3e69241e6a81484a993a19566197abc8f19de0e8..fa23e0671bb3be7a2423d486c8b028b3cdccdee3 100644 (file)
@@ -774,8 +774,8 @@ struct fb_info {
 #endif
 
        struct fb_ops *fbops;
-       struct device *device;
-       struct class_device *class_device; /* sysfs per device attrs */
+       struct device *device;          /* This is the parent */
+       struct device *dev;             /* This is this fb device */
        int class_flag;                    /* private sysfs flags */
 #ifdef CONFIG_FB_TILEBLITTING
        struct fb_tile_ops *tileops;    /* Tile Blitting */
@@ -910,8 +910,8 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
 /* drivers/video/fbsysfs.c */
 extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
 extern void framebuffer_release(struct fb_info *info);
-extern int fb_init_class_device(struct fb_info *fb_info);
-extern void fb_cleanup_class_device(struct fb_info *head);
+extern int fb_init_device(struct fb_info *fb_info);
+extern void fb_cleanup_device(struct fb_info *head);
 extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max);
 
 /* drivers/video/fbmon.c */
index fd1756d3a47e9b29f77f917b730464f4fb5daa33..88b45895746d654a6dc1ca3332c72c7990f60110 100644 (file)
@@ -315,7 +315,7 @@ typedef struct {
 * structures.  If the freq0 variable is non-zero, the tone table contents
 * for the tone_index are updated to the frequencies and gains defined.  It
 * should be noted that DTMF tones cannot be reassigned, so if DTMF tone
-* table indexs are used in a cadence the frequency and gain variables will
+* table indexes are used in a cadence the frequency and gain variables will
 * be ignored.
 *
 * If the array elements contain frequency parameters the driver will
index c8d5f207c3d4892cf23fc4ebd24b736b4023779a..0ec6e28bccd27b7d2861f5eb442d5b06610d97f3 100644 (file)
@@ -74,7 +74,7 @@
 #define __jiffy_data  __attribute__((section(".data")))
 
 /*
- * The 64-bit value is not volatile - you MUST NOT read it
+ * The 64-bit value is not atomic - you MUST NOT read it
  * without sampling the sequence number in xtime_lock.
  * get_jiffies_64() will do this for you as appropriate.
  */
index b9b5e4ba166a712f5f4f20f0ca9baed601365ad8..6738283ac38550a1258b69fdf6b9e537c6abe1b2 100644 (file)
@@ -65,7 +65,7 @@ struct user;
  * context (spinlock, irq-handler, ...).
  *
  * This is a useful debugging help to be able to catch problems early and not
- * be biten later when the calling function happens to sleep when it is not
+ * be bitten later when the calling function happens to sleep when it is not
  * supposed to.
  */
 #ifdef CONFIG_PREEMPT_VOLUNTARY
index bcd9cd173c2c80ffce52af4ea925c24e7f22dc0f..d1c8d28fa92ebc844906c88d9081c78af719dcdb 100644 (file)
@@ -47,6 +47,7 @@ enum kobject_action {
        KOBJ_UMOUNT     = (__force kobject_action_t) 0x05,      /* umount event for block devices (broken) */
        KOBJ_OFFLINE    = (__force kobject_action_t) 0x06,      /* device offline */
        KOBJ_ONLINE     = (__force kobject_action_t) 0x07,      /* device online */
+       KOBJ_MOVE       = (__force kobject_action_t) 0x08,      /* device move */
 };
 
 struct kobject {
@@ -76,6 +77,7 @@ extern int __must_check kobject_add(struct kobject *);
 extern void kobject_del(struct kobject *);
 
 extern int __must_check kobject_rename(struct kobject *, const char *new_name);
+extern int __must_check kobject_move(struct kobject *, struct kobject *);
 
 extern int __must_check kobject_register(struct kobject *);
 extern void kobject_unregister(struct kobject *);
@@ -264,6 +266,8 @@ extern int __must_check subsys_create_file(struct subsystem * ,
 
 #if defined(CONFIG_HOTPLUG)
 void kobject_uevent(struct kobject *kobj, enum kobject_action action);
+void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
+                       char *envp[]);
 
 int add_uevent_var(char **envp, int num_envp, int *cur_index,
                        char *buffer, int buffer_size, int *cur_len,
@@ -271,6 +275,10 @@ int add_uevent_var(char **envp, int num_envp, int *cur_index,
        __attribute__((format (printf, 7, 8)));
 #else
 static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { }
+static inline void kobject_uevent_env(struct kobject *kobj,
+                                     enum kobject_action action,
+                                     char *envp[])
+{ }
 
 static inline int add_uevent_var(char **envp, int num_envp, int *cur_index,
                                      char *buffer, int buffer_size, int *cur_len, 
index b03cfb91e228dd993987e3b2eb497c832397e073..326da7d500c73953624093bd6cb9ae995d8e1725 100644 (file)
 #define        HPET_MINOR           228
 
 struct device;
-struct class_device;
 
 struct miscdevice  {
        int minor;
        const char *name;
        const struct file_operations *fops;
        struct list_head list;
-       struct device *dev;
-       struct class_device *class;
+       struct device *parent;
+       struct device *this_device;
 };
 
 extern int misc_register(struct miscdevice * misc);
index 587264a58d5605835319bcfc77912e9763391128..528e7d3fecb18123fc3f98bd022bcc5df97efc5f 100644 (file)
@@ -74,8 +74,8 @@ struct mmc_card;
 struct device;
 
 struct mmc_host {
-       struct device           *dev;
-       struct class_device     class_dev;
+       struct device           *parent;
+       struct device           class_dev;
        int                     index;
        const struct mmc_host_ops *ops;
        unsigned int            f_min;
@@ -125,8 +125,8 @@ static inline void *mmc_priv(struct mmc_host *host)
        return (void *)host->private;
 }
 
-#define mmc_dev(x)     ((x)->dev)
-#define mmc_hostname(x)        ((x)->class_dev.class_id)
+#define mmc_dev(x)     ((x)->parent)
+#define mmc_hostname(x)        ((x)->class_dev.bus_id)
 
 extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
 extern int mmc_resume_host(struct mmc_host *);
index d1d00ce8f4ed5c53ecd09b8d6f38a0ddcb503089..9258ffd8a7f065fdba672284297d2934fba86a7e 100644 (file)
@@ -264,6 +264,7 @@ struct module
        struct module_attribute *modinfo_attrs;
        const char *version;
        const char *srcversion;
+       struct kobject *drivers_dir;
 
        /* Exported symbols */
        const struct kernel_symbol *syms;
index 8db9d75541a631c36946664283ec92275715692e..8b5a79615fbf16aaf21a3912697ddf7562346d81 100644 (file)
@@ -18,8 +18,6 @@
 #ifndef _LINUX_MQUEUE_H
 #define _LINUX_MQUEUE_H
 
-#include <linux/types.h>
-
 #define MQ_PRIO_MAX    32768
 /* per-uid limit of kernel memory used by mqueue, in bytes */
 #define MQ_BYTES_MAX   819200
index 29cd6dee13db968266e14dcefee386eaf421fdeb..20f47b81d3fad3055a1eb048d7acf47473596c72 100644 (file)
@@ -58,6 +58,12 @@ struct platform_driver {
 extern int platform_driver_register(struct platform_driver *);
 extern void platform_driver_unregister(struct platform_driver *);
 
+/* non-hotpluggable platform devices may use this so that probe() and
+ * its support may live in __init sections, conserving runtime memory.
+ */
+extern int platform_driver_probe(struct platform_driver *driver,
+               int (*probe)(struct platform_device *));
+
 #define platform_get_drvdata(_dev)     dev_get_drvdata(&(_dev)->dev)
 #define platform_set_drvdata(_dev,data)        dev_set_drvdata(&(_dev)->dev, (data))
 
index 73e0becec0866d39664b79cae596b712e811b2fe..62a7169aed8b12d1a4e231f57b93d68bd4ec040e 100644 (file)
@@ -429,7 +429,7 @@ enum reiserfs_mount_options {
 /* -o hash={tea, rupasov, r5, detect} is meant for properly mounting 
 ** reiserfs disks from 3.5.19 or earlier.  99% of the time, this option
 ** is not required.  If the normal autodection code can't determine which
-** hash to use (because both hases had the same value for a file)
+** hash to use (because both hashes had the same value for a file)
 ** use this option to force a specific hash.  It won't allow you to override
 ** the existing hash on the FS, so if you have a tea hash disk, and mount
 ** with -o hash=rupasov, the mount will fail.
index 6d5c43d31dec27e7b0a0131c5cc1c03a5b030612..2129d1b6c8749fc06274784d3ce7b8925533b962 100644 (file)
@@ -96,6 +96,9 @@ sysfs_remove_dir(struct kobject *);
 extern int __must_check
 sysfs_rename_dir(struct kobject *, const char *new_name);
 
+extern int __must_check
+sysfs_move_dir(struct kobject *, struct kobject *);
+
 extern int __must_check
 sysfs_create_file(struct kobject *, const struct attribute *);
 
@@ -142,6 +145,11 @@ static inline int sysfs_rename_dir(struct kobject * k, const char *new_name)
        return 0;
 }
 
+static inline int sysfs_move_dir(struct kobject * k, struct kobject * new_parent)
+{
+       return 0;
+}
+
 static inline int sysfs_create_file(struct kobject * k, const struct attribute * a)
 {
        return 0;
index 7dac8f04d28e1aee64cec1a140bd52aded10edd1..004808a6df1d080f8389cf2a57f1d4c85ff7673d 100644 (file)
@@ -20,7 +20,7 @@ struct ts_config;
 /**
  * struct ts_state - search state
  * @offset: offset for next match
- * @cb: control buffer, for persistant variables of get_next_block()
+ * @cb: control buffer, for persistent variables of get_next_block()
  */
 struct ts_state
 {
@@ -71,7 +71,7 @@ struct ts_config
         * Called repeatedly until 0 is returned. Must assign the
         * head of the next block of data to &*dst and return the length
         * of the block or 0 if at the end. consumed == 0 indicates
-        * a new search. May store/read persistant values in state->cb.
+        * a new search. May store/read persistent values in state->cb.
         */
        unsigned int            (*get_next_block)(unsigned int consumed,
                                                  const u8 **dst,
index 44091c0db0b46b473234172a91d983319648e7ce..65321f911c1e4be2769e9c8417dd919140446e90 100644 (file)
@@ -276,9 +276,8 @@ extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc);
 extern int tty_unregister_ldisc(int disc);
 extern int tty_register_driver(struct tty_driver *driver);
 extern int tty_unregister_driver(struct tty_driver *driver);
-extern struct class_device *tty_register_device(struct tty_driver *driver,
-                                               unsigned index,
-                                               struct device *dev);
+extern struct device *tty_register_device(struct tty_driver *driver,
+                                         unsigned index, struct device *dev);
 extern void tty_unregister_device(struct tty_driver *driver, unsigned index);
 extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp,
                             int buflen);
index fa1ca0127babe1731fca854e5b4aa3e26ed30cef..a994bea09cd6debedcf08bd740ca8a0cde227ec4 100644 (file)
@@ -132,6 +132,7 @@ struct snd_card {
        int shutdown;                   /* this card is going down */
        int free_on_last_close;         /* free in context of file_release */
        wait_queue_head_t shutdown_sleep;
+       struct device *parent;
        struct device *dev;
 
 #ifdef CONFIG_PM
@@ -187,13 +188,14 @@ struct snd_minor {
        int device;                     /* device number */
        const struct file_operations *f_ops;    /* file operations */
        void *private_data;             /* private data for f_ops->open */
-       struct class_device *class_dev; /* class device for sysfs */
+       struct device *dev;             /* device for sysfs */
 };
 
 /* sound.c */
 
 extern int snd_major;
 extern int snd_ecards_limit;
+extern struct class *sound_class;
 
 void snd_request_card(int card);
 
@@ -203,7 +205,7 @@ int snd_register_device(int type, struct snd_card *card, int dev,
 int snd_unregister_device(int type, struct snd_card *card, int dev);
 void *snd_lookup_minor_data(unsigned int minor, int type);
 int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev,
-                             const struct class_device_attribute *attr);
+                             struct device_attribute *attr);
 
 #ifdef CONFIG_SND_OSSEMUL
 int snd_register_oss_device(int type, struct snd_card *card, int dev,
@@ -255,7 +257,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file);
 int snd_card_file_remove(struct snd_card *card, struct file *file);
 
 #ifndef snd_card_set_dev
-#define snd_card_set_dev(card,devptr) ((card)->dev = (devptr))
+#define snd_card_set_dev(card,devptr) ((card)->parent = (devptr))
 #endif
 
 /* device.c */
index 176f7e5136c74d2db3923c69751121cdb460d451..14d484606fab9b0bbdff72b318d664fc5d7b73b3 100644 (file)
@@ -249,6 +249,26 @@ config CPUSETS
 
          Say N if unsure.
 
+config SYSFS_DEPRECATED
+       bool "Create deprecated sysfs files"
+       default y
+       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 heirachy, in
+         order to support older versions of udev.
+
+         If you are using a distro that was released in 2006 or later,
+         it should be safe to say N here.
+
 config RELAY
        bool "Kernel->user space relay support (formerly relayfs)"
        help
index f0166563c602f12aba2867b60965959bfb57f6a7..45e01cb60101128c26737907c6c23d2a8acb58ab 100644 (file)
@@ -1086,22 +1086,35 @@ static int mod_sysfs_setup(struct module *mod,
                goto out;
        kobj_set_kset_s(&mod->mkobj, module_subsys);
        mod->mkobj.mod = mod;
-       err = kobject_register(&mod->mkobj.kobj);
+
+       /* delay uevent until full sysfs population */
+       kobject_init(&mod->mkobj.kobj);
+       err = kobject_add(&mod->mkobj.kobj);
        if (err)
                goto out;
 
+       mod->drivers_dir = kobject_add_dir(&mod->mkobj.kobj, "drivers");
+       if (!mod->drivers_dir)
+               goto out_unreg;
+
        err = module_param_sysfs_setup(mod, kparam, num_params);
        if (err)
-               goto out_unreg;
+               goto out_unreg_drivers;
 
        err = module_add_modinfo_attrs(mod);
        if (err)
-               goto out_unreg;
+               goto out_unreg_param;
 
+       kobject_uevent(&mod->mkobj.kobj, KOBJ_ADD);
        return 0;
 
+out_unreg_drivers:
+       kobject_unregister(mod->drivers_dir);
+out_unreg_param:
+       module_param_sysfs_remove(mod);
 out_unreg:
-       kobject_unregister(&mod->mkobj.kobj);
+       kobject_del(&mod->mkobj.kobj);
+       kobject_put(&mod->mkobj.kobj);
 out:
        return err;
 }
@@ -1110,6 +1123,7 @@ static void mod_kobject_remove(struct module *mod)
 {
        module_remove_modinfo_attrs(mod);
        module_param_sysfs_remove(mod);
+       kobject_unregister(mod->drivers_dir);
 
        kobject_unregister(&mod->mkobj.kobj);
 }
@@ -2275,11 +2289,14 @@ void print_modules(void)
 
 void module_add_driver(struct module *mod, struct device_driver *drv)
 {
+       int no_warn;
+
        if (!mod || !drv)
                return;
 
-       /* Don't check return code; this call is idempotent */
-       sysfs_create_link(&drv->kobj, &mod->mkobj.kobj, "module");
+       /* Don't check return codes; these calls are idempotent */
+       no_warn = sysfs_create_link(&drv->kobj, &mod->mkobj.kobj, "module");
+       no_warn = sysfs_create_link(mod->drivers_dir, &drv->kobj, drv->name);
 }
 EXPORT_SYMBOL(module_add_driver);
 
@@ -2288,6 +2305,8 @@ void module_remove_driver(struct device_driver *drv)
        if (!drv)
                return;
        sysfs_remove_link(&drv->kobj, "module");
+       if (drv->owner && drv->owner->drivers_dir)
+               sysfs_remove_link(drv->owner->drivers_dir, drv->name);
 }
 EXPORT_SYMBOL(module_remove_driver);
 
index 7dd5c0e9d996adb07681e02037e746b68a2a2f50..744a4b102c7fa595b09808f8a6f949318a1f57a1 100644 (file)
@@ -310,6 +310,56 @@ int kobject_rename(struct kobject * kobj, const char *new_name)
        return error;
 }
 
+/**
+ *     kobject_move - move object to another parent
+ *     @kobj:  object in question.
+ *     @new_parent: object's new parent
+ */
+
+int kobject_move(struct kobject *kobj, struct kobject *new_parent)
+{
+       int error;
+       struct kobject *old_parent;
+       const char *devpath = NULL;
+       char *devpath_string = NULL;
+       char *envp[2];
+
+       kobj = kobject_get(kobj);
+       if (!kobj)
+               return -EINVAL;
+       new_parent = kobject_get(new_parent);
+       if (!new_parent) {
+               error = -EINVAL;
+               goto out;
+       }
+       /* old object path */
+       devpath = kobject_get_path(kobj, GFP_KERNEL);
+       if (!devpath) {
+               error = -ENOMEM;
+               goto out;
+       }
+       devpath_string = kmalloc(strlen(devpath) + 15, GFP_KERNEL);
+       if (!devpath_string) {
+               error = -ENOMEM;
+               goto out;
+       }
+       sprintf(devpath_string, "DEVPATH_OLD=%s", devpath);
+       envp[0] = devpath_string;
+       envp[1] = NULL;
+       error = sysfs_move_dir(kobj, new_parent);
+       if (error)
+               goto out;
+       old_parent = kobj->parent;
+       kobj->parent = new_parent;
+       kobject_put(old_parent);
+       kobject_uevent_env(kobj, KOBJ_MOVE, envp);
+out:
+       kobject_put(kobj);
+       kfree(devpath_string);
+       kfree(devpath);
+       return error;
+}
+
 /**
  *     kobject_del - unlink kobject from hierarchy.
  *     @kobj:  object.
index 7f20e7b857cb559b7624d89ca4c52bbf86bc1b65..a1922765ff315dfe1a90879f567c82e08521eaa2 100644 (file)
@@ -50,18 +50,22 @@ static char *action_to_string(enum kobject_action action)
                return "offline";
        case KOBJ_ONLINE:
                return "online";
+       case KOBJ_MOVE:
+               return "move";
        default:
                return NULL;
        }
 }
 
 /**
- * kobject_uevent - notify userspace by ending an uevent
+ * kobject_uevent_env - send an uevent with environmental data
  *
- * @action: action that is happening (usually KOBJ_ADD and KOBJ_REMOVE)
+ * @action: action that is happening (usually KOBJ_MOVE)
  * @kobj: struct kobject that the action is happening to
+ * @envp_ext: pointer to environmental data
  */
-void kobject_uevent(struct kobject *kobj, enum kobject_action action)
+void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
+                       char *envp_ext[])
 {
        char **envp;
        char *buffer;
@@ -76,6 +80,7 @@ void kobject_uevent(struct kobject *kobj, enum kobject_action action)
        char *seq_buff;
        int i = 0;
        int retval;
+       int j;
 
        pr_debug("%s\n", __FUNCTION__);
 
@@ -134,7 +139,8 @@ void kobject_uevent(struct kobject *kobj, enum kobject_action action)
        scratch += sprintf (scratch, "DEVPATH=%s", devpath) + 1;
        envp [i++] = scratch;
        scratch += sprintf(scratch, "SUBSYSTEM=%s", subsystem) + 1;
-
+       for (j = 0; envp_ext && envp_ext[j]; j++)
+               envp[i++] = envp_ext[j];
        /* just reserve the space, overwrite it after kset call has returned */
        envp[i++] = seq_buff = scratch;
        scratch += strlen("SEQNUM=18446744073709551616") + 1;
@@ -200,6 +206,20 @@ exit:
        kfree(envp);
        return;
 }
+
+EXPORT_SYMBOL_GPL(kobject_uevent_env);
+
+/**
+ * kobject_uevent - notify userspace by ending an uevent
+ *
+ * @action: action that is happening (usually KOBJ_ADD and KOBJ_REMOVE)
+ * @kobj: struct kobject that the action is happening to
+ */
+void kobject_uevent(struct kobject *kobj, enum kobject_action action)
+{
+       kobject_uevent_env(kobj, action, NULL);
+}
+
 EXPORT_SYMBOL_GPL(kobject_uevent);
 
 /**
index 2cb4a437942e980979098d302efef163d3d3f9f1..98bcadc0118523faeaf8443d4aeb248520c9798d 100644 (file)
@@ -40,7 +40,7 @@
  *       configuration according to the specified parameters.
  *   (3) User starts the search(es) by calling _find() or _next() to
  *       fetch subsequent occurrences. A state variable is provided
- *       to the algorihtm to store persistant variables.
+ *       to the algorihtm to store persistent variables.
  *   (4) Core eventually resets the search offset and forwards the find()
  *       request to the algorithm.
  *   (5) Algorithm calls get_next_block() provided by the user continously
index 6f39faa1583280e61ebda1f364067bd4ff4b9efa..c2059733e15a10700d7d90dd12308da986027a9c 100644 (file)
@@ -13,7 +13,7 @@
 * Due Credit:
 *               Wanpipe socket layer is based on Packet and 
 *               the X25 socket layers. The above sockets were 
-*               used for the specific use of Sangoma Technoloiges 
+*               used for the specific use of Sangoma Technologies 
 *               API programs. 
 *               Packet socket Authors: Ross Biro, Fred N. van Kempen and 
 *                                      Alan Cox.
@@ -23,7 +23,7 @@
 * Apr 25, 2000  Nenad Corbic     o Added the ability to send zero length packets.
 * Mar 13, 2000  Nenad Corbic    o Added a tx buffer check via ioctl call.
 * Mar 06, 2000  Nenad Corbic     o Fixed the corrupt sock lcn problem.
-*                                  Server and client applicaton can run
+*                                  Server and client application can run
 *                                  simultaneously without conflicts.
 * Feb 29, 2000  Nenad Corbic     o Added support for PVC protocols, such as
 *                                  CHDLC, Frame Relay and HDLC API.
index 9479659277aeea861b7aafaa96a3f6d8823411b8..316211d9f17d97ffeab6823778c03113cdd5a76a 100644 (file)
@@ -3,7 +3,7 @@
 *
 *              This module is completely hardware-independent and provides
 *              the following common services for the WAN Link Drivers:
-*               o WAN device managenment (registering, unregistering)
+*               o WAN device management (registering, unregistering)
 *               o Network interface management
 *               o Physical connection management (dial-up, incoming calls)
 *               o Logical connection management (switched virtual circuits)
index e0d791a9845246b907fde876d441b46852c4268f..95949b6806acbdf9580b23b10e5e9cac8722df3e 100644 (file)
@@ -64,11 +64,11 @@ source "sound/arm/Kconfig"
 
 source "sound/mips/Kconfig"
 
-# the following will depenend on the order of config.
+# the following will depend on the order of config.
 # here assuming USB is defined before ALSA
 source "sound/usb/Kconfig"
 
-# the following will depenend on the order of config.
+# the following will depend on the order of config.
 # here assuming PCMCIA is defined before ALSA
 source "sound/pcmcia/Kconfig"
 
index 3058d626a90a009abf2c8f4700ee9af4cf11fbc8..6152a7554dfd2dd32492897befd1bb8ed502cd95 100644 (file)
@@ -361,6 +361,8 @@ static int snd_card_do_free(struct snd_card *card)
                snd_printk(KERN_WARNING "unable to free card info\n");
                /* Not fatal error */
        }
+       if (card->dev)
+               device_unregister(card->dev);
        kfree(card);
        return 0;
 }
@@ -495,6 +497,12 @@ int snd_card_register(struct snd_card *card)
        int err;
 
        snd_assert(card != NULL, return -EINVAL);
+       if (!card->dev) {
+               card->dev = device_create(sound_class, card->parent, 0,
+                                         "card%i", card->number);
+               if (IS_ERR(card->dev))
+                       card->dev = NULL;
+       }
        if ((err = snd_device_register_all(card)) < 0)
                return err;
        mutex_lock(&snd_card_mutex);
index fbbbcd20c4cc7d6001163631dbfa15b55900e56d..5ac6e19ccb4128814c2356f634c43a46a67b0ccf 100644 (file)
@@ -910,7 +910,8 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream)
        substream->pstr->substream_opened--;
 }
 
-static ssize_t show_pcm_class(struct class_device *class_device, char *buf)
+static ssize_t show_pcm_class(struct device *dev,
+                             struct device_attribute *attr, char *buf)
 {
        struct snd_pcm *pcm;
        const char *str;
@@ -921,7 +922,7 @@ static ssize_t show_pcm_class(struct class_device *class_device, char *buf)
                [SNDRV_PCM_CLASS_DIGITIZER] = "digitizer",
        };
 
-       if (! (pcm = class_get_devdata(class_device)) ||
+       if (! (pcm = dev_get_drvdata(dev)) ||
            pcm->dev_class > SNDRV_PCM_CLASS_LAST)
                str = "none";
        else
@@ -929,7 +930,7 @@ static ssize_t show_pcm_class(struct class_device *class_device, char *buf)
         return snprintf(buf, PAGE_SIZE, "%s\n", str);
 }
 
-static struct class_device_attribute pcm_attrs =
+static struct device_attribute pcm_attrs =
        __ATTR(pcm_class, S_IRUGO, show_pcm_class, NULL);
 
 static int snd_pcm_dev_register(struct snd_device *device)
index efa476c5210ac52832d8e7154984d42717d8588b..282742022de6f603f905c611b21cebb685edd015 100644 (file)
@@ -61,9 +61,6 @@ EXPORT_SYMBOL(snd_ecards_limit);
 static struct snd_minor *snd_minors[SNDRV_OS_MINORS];
 static DEFINE_MUTEX(sound_mutex);
 
-extern struct class *sound_class;
-
-
 #ifdef CONFIG_KMOD
 
 /**
@@ -268,11 +265,10 @@ int snd_register_device(int type, struct snd_card *card, int dev,
        snd_minors[minor] = preg;
        if (card)
                device = card->dev;
-       preg->class_dev = class_device_create(sound_class, NULL,
-                                             MKDEV(major, minor),
-                                             device, "%s", name);
-       if (preg->class_dev)
-               class_set_devdata(preg->class_dev, private_data);
+       preg->dev = device_create(sound_class, device, MKDEV(major, minor),
+                                 "%s", name);
+       if (preg->dev)
+               dev_set_drvdata(preg->dev, private_data);
 
        mutex_unlock(&sound_mutex);
        return 0;
@@ -320,7 +316,7 @@ int snd_unregister_device(int type, struct snd_card *card, int dev)
                return -EINVAL;
        }
 
-       class_device_destroy(sound_class, MKDEV(major, minor));
+       device_destroy(sound_class, MKDEV(major, minor));
 
        kfree(snd_minors[minor]);
        snd_minors[minor] = NULL;
@@ -331,15 +327,15 @@ int snd_unregister_device(int type, struct snd_card *card, int dev)
 EXPORT_SYMBOL(snd_unregister_device);
 
 int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev,
-                             const struct class_device_attribute *attr)
+                             struct device_attribute *attr)
 {
        int minor, ret = -EINVAL;
-       struct class_device *cdev;
+       struct device *d;
 
        mutex_lock(&sound_mutex);
        minor = find_snd_minor(type, card, dev);
-       if (minor >= 0 && (cdev = snd_minors[minor]->class_dev) != NULL)
-               ret = class_device_create_file(cdev, attr);
+       if (minor >= 0 && (d = snd_minors[minor]->dev) != NULL)
+               ret = device_create_file(d, attr);
        mutex_unlock(&sound_mutex);
        return ret;
 
index 6e3c41f530e6ee3106cafd6b87c5a5cf4989f13a..b1c5d8286e403c595f81b9f4b529797c4fd05da6 100644 (file)
@@ -779,7 +779,7 @@ static unsigned int cs_set_adc_rate(struct cs_state *state, unsigned int rate)
                rate = 48000 / 9;
 
        /*
-        *  We can not capture at at rate greater than the Input Rate (48000).
+        *  We cannot capture at at rate greater than the Input Rate (48000).
         *  Return an error if an attempt is made to stray outside that limit.
         */
        if (rate > 48000)
@@ -4754,8 +4754,8 @@ static int cs_hardware_init(struct cs_card *card)
        mdelay(5 * cs_laptop_wait);             /* Shouldnt be needed ?? */
        
 /*
-* If we are resuming under 2.2.x then we can not schedule a timeout.
-* so, just spin the CPU.
+* If we are resuming under 2.2.x then we cannot schedule a timeout,
+* so just spin the CPU.
 */
        if (card->pm.flags & CS46XX_PM_IDLE) {
        /*
index 2344d09c7114fb4091d24f0fdfbc3d9da7c7bcff..75c5e745705feab67239e94ef02e5afad25761a8 100644 (file)
@@ -557,17 +557,17 @@ static int __init oss_init(void)
        sound_dmap_flag = (dmabuf > 0 ? 1 : 0);
 
        for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) {
-               class_device_create(sound_class, NULL,
-                                   MKDEV(SOUND_MAJOR, dev_list[i].minor),
-                                   NULL, "%s", dev_list[i].name);
+               device_create(sound_class, NULL,
+                             MKDEV(SOUND_MAJOR, dev_list[i].minor),
+                             "%s", dev_list[i].name);
 
                if (!dev_list[i].num)
                        continue;
 
                for (j = 1; j < *dev_list[i].num; j++)
-                       class_device_create(sound_class, NULL,
-                                           MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)),
-                                           NULL, "%s%d", dev_list[i].name, j);
+                       device_create(sound_class, NULL,
+                                     MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)),
+                                     "%s%d", dev_list[i].name, j);
        }
 
        if (sound_nblocks >= 1024)
@@ -581,11 +581,11 @@ static void __exit oss_cleanup(void)
        int i, j;
 
        for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) {
-               class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor));
+               device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor));
                if (!dev_list[i].num)
                        continue;
                for (j = 1; j < *dev_list[i].num; j++)
-                       class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)));
+                       device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)));
        }
        
        unregister_sound_special(1);
index 5322c50c9617c2f8aa0850b60e873a5caef26c2d..8f1ced4ab34cb2fbf0dd3143fa882ce916dafac6 100644 (file)
@@ -170,8 +170,8 @@ static int sound_insert_unit(struct sound_unit **list, const struct file_operati
        else
                sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP);
 
-       class_device_create(sound_class, NULL, MKDEV(SOUND_MAJOR, s->unit_minor),
-                           dev, s->name+6);
+       device_create(sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor),
+                     s->name+6);
        return r;
 
  fail:
@@ -193,7 +193,7 @@ static void sound_remove_unit(struct sound_unit **list, int unit)
        p = __sound_remove_unit(list, unit);
        spin_unlock(&sound_loader_lock);
        if (p) {
-               class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, p->unit_minor));
+               device_destroy(sound_class, MKDEV(SOUND_MAJOR, p->unit_minor));
                kfree(p);
        }
 }