14 Oct, 2008

40 commits

  • This improves the machine level API in order to configure
    regulator constraints and consumers as platform data and removes the
    old string based API that required several calls to set up each regulator.

    The intention is to create a struct regulator_init_data, populate
    it's fields with constraints, consumers devices, etc and then register
    the regulator device from board.c in the standard Linux way.

    e.g. regulator LDO2 (supplying codec and sim) platform data.

    /* regulator LDO2 consumer devices */
    static struct regulator_consumer_supply ldo2_consumers[] = {
    {
    .dev = &platform_audio_device.dev,
    .supply = "codec_avdd",
    },
    {
    .dev = &platform_sim_device.dev,
    .supply = "sim_vcc",
    }
    };

    /* regulator LDO2 constraints */
    static struct regulator_init_data ldo2_data = {
    .constraints = {
    .min_uV = 3300000,
    .max_uV = 3300000,
    .valid_modes_mask = REGULATOR_MODE_NORMAL,
    .apply_uV = 1,
    },
    .num_consumer_supplies = ARRAY_SIZE(ldo2_consumers),
    .consumer_supplies = ldo2_consumers,
    };

    /* machine regulator devices with thier consumers and constraints */
    static struct platform_device wm8350_regulator_devices[] = {
    {
    .name = "wm8350-regulator",
    .id = WM8350_LDO_2,
    .dev = {
    .platform_data = &ldo2_data,
    },
    },
    };

    Changes in detail:-

    o Removed all const char* regulator config functions in machine API.
    o Created new struct regulator_init_data to contain regulator
    machine configuration constraints and consmuers.
    o Changed set_supply(), set_machine_constraints(),
    set_consumer_device_supply() to remove their string identifier
    parameters. Also made them static and moved functions nearer top of
    core.c.
    o Removed no longer used inline func to_rdev()
    o Added regulator_get_init_drvdata() to retrieve init data.
    o Added struct device* as parameter to regulator_register().
    o Changed my email address.

    Signed-off-by: Eric Miao
    Signed-off-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Liam Girdwood
     
  • This is a much better version of a previous patch to make the parser
    tables constant. Rather than changing the typedef, we put the "const" in
    all the various places where its required, allowing the __initconst
    exception for nfsroot which was the cause of the previous trouble.

    This was posted for review some time ago and I believe its been in -mm
    since then.

    Signed-off-by: Steven Whitehouse
    Cc: Alexander Viro
    Signed-off-by: Linus Torvalds

    Steven Whitehouse
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (60 commits)
    Blackfin arch: make sure we include the fix for SPORT hysteresis when reprogramming clocks
    Blackfin arch: Fix bogus str_ident check in gpio code
    Blackfin arch: AD7879 Touchscreen driver
    Blackfin arch: introducing bfin_addr_dcachable
    Blackfin arch: fix a typo in comments
    Blackfin arch: Remove useless head file
    Blackfin arch: make sure L2 start and length are always defined (fixes building on BF542)
    Blackfin arch: use the Blackfin on-chip ROM to do software reset when possible
    Blackfin arch: update anomaly headers to match the latest sheet
    Blackfin arch: bfin_reset() is an internal reboot function ... everyone should go through machine_restart()
    Blackfin arch: print out error/warning if you are running on the incorrect CPU type
    Blackfin arch: remove non-bf54x ifdef logic since this file is only compiled on bf54x parts
    Blackfin arch: update board defconfigs
    Blackfin arch: Add optional verbose debug
    Blackfin arch: emulate a TTY over the EMUDAT/JTAG interface
    Blackfin arch: have is_user_addr_valid() check for overflows (like when address is -1)
    Blackfin arch: ptrace - fix off-by-one check on end of memory regions
    Blackfin arch: Enable framebuffer support for the BF526-EZkit TFT LCD display
    Blackfin arch: flash memory map and dm9000 resources updating
    Blackfin arch: early prink code still use uart core console functions to parse and set configure option string
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    net/mac80211/rx.c: fix build error
    acpi: Make ACPI_TOSHIBA depend on INPUT.
    net/bfin_mac.c MDIO namespace fixes
    jme: remove unused #include
    netfilter: remove unused #include
    net: Fix off-by-one in skb_dma_map
    smc911x: Add support for LAN921{5,7,8} chips from SMSC
    qlge: remove duplicated #include
    wireless: remove duplicated #include
    net/au1000_eth.c MDIO namespace fixes
    net/tc35815.c: fix compilation
    sky2: Fix WOL regression
    r8169: NULL pointer dereference on r8169 load

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    chmc: Mark %ver register inline asm with __volatile__
    sparc64: Add missing notify_cpu_starting() call.
    sparc32: fix build errors

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (33 commits)
    ALSA: ASoC codec: remove unused #include
    ALSA: ASoC: update email address for Liam Girdwood
    ALSA: hda: corrected invalid mixer values
    ALSA: hda: add mixers for analog mixer on 92hd75xx codecs
    ALSA: ASoC: Add destination and source port for DMA on OMAP1
    ALSA: ASoC: Drop device registration from GTA01 lm4857 driver
    ALSA: ASoC: Fix build of GTA01 audio driver
    ALSA: ASoC: Add widgets before setting endpoints on GTA01
    ALSA: ASoC: Fix inverted input PGA mute bits in WM8903
    ALSA: ASoC: OMAP: Set DMA stream name at runtime in McBSP DAI driver
    ALSA: ASoC: OMAP: Add support for OMAP2430 and OMAP34xx in McBSP DAI driver
    ALSA: ASoC: OMAP: Add multilink support to McBSP DAI driver
    ALSA: ASoC: Make TLV320AIC26 user-visible
    ALSA: ASoC - clean up Kconfig for TLV320AIC2
    ALSA: ASoC: Make WM8510 microphone input a DAPM mixer
    ALSA: ASoC: Implement WM8510 bias level control
    ALSA: ASoC: Remove unused AUDIO_NAME define from codec drivers
    ALSA: ASoC: tlv320aic3x: Use uniform tlv320aic naming
    ALSA: ASoC: Add WM8510 SPI support
    ALSA: ASoC: Add WM8753 SPI support
    ...

    Linus Torvalds
     
  • * 'proc' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc:
    proc: remove kernel.maps_protect
    proc: remove now unneeded ADDBUF macro
    [PATCH] proc: show personality via /proc/pid/personality
    [PATCH] signal, procfs: some lock_task_sighand() users do not need rcu_read_lock()
    proc: move PROC_PAGE_MONITOR to fs/proc/Kconfig
    proc: make grab_header() static
    proc: remove unused get_dma_list()
    proc: remove dummy vmcore_open()
    proc: proc_sys_root tweak
    proc: fix return value of proc_reg_open() in "too late" case

    Fixed up trivial conflict in removed file arch/sparc/include/asm/dma_32.h

    Linus Torvalds
     
  • …s/security-testing-2.6

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (24 commits)
    integrity: special fs magic
    As pointed out by Jonathan Corbet, the timer must be deleted before
    ERROR: code indent should use tabs where possible
    The tpm_dev_release function is only called for platform devices, not pnp
    Protect tpm_chip_list when transversing it.
    Renames num_open to is_open, as only one process can open the file at a time.
    Remove the BKL calls from the TPM driver, which were added in the overall
    netlabel: Add configuration support for local labeling
    cipso: Add support for native local labeling and fixup mapping names
    netlabel: Changes to the NetLabel security attributes to allow LSMs to pass full contexts
    selinux: Cache NetLabel secattrs in the socket's security struct
    selinux: Set socket NetLabel based on connection endpoint
    netlabel: Add functionality to set the security attributes of a packet
    netlabel: Add network address selectors to the NetLabel/LSM domain mapping
    netlabel: Add a generic way to create ordered linked lists of network addrs
    netlabel: Replace protocol/NetLabel linking with refrerence counts
    smack: Fix missing calls to netlbl_skbuff_err()
    selinux: Fix missing calls to netlbl_skbuff_err()
    selinux: Fix a problem in security_netlbl_sid_to_secattr()
    selinux: Better local/forward check in selinux_ip_postroute()
    ...

    Linus Torvalds
     
  • * git://git.infradead.org/users/dwmw2/random-2.6:
    Fix autoloading of MacBook Pro backlight driver.
    Automatic MODULE_ALIAS() for DMI match tables.
    Remove asm/a.out.h files for all architectures without a.out support.
    Introduce HAVE_AOUT symbol to remove hard-coded arch list for BINFMT_AOUT
    Remove redundant CONFIG_ARCH_SUPPORTS_AOUT
    S390: Update comments about why we don't use
    SPARC: Use
    PowerPC: Use
    PARISC: Use
    x86_64: Use
    IA64: Use
    ARM: Use
    Make suitable for 64-bit platforms.
    Define and use PCI_DEVICE_ID_MARVELL_88ALP01_CCIC for CAFÉ camera driver
    [MTD] [NAND] Define and use PCI_DEVICE_ID_MARVELL_88ALP01_NAND for CAFÉ
    Use PCI_DEVICE_ID_88ALP01 for CAFÉ chip, rather than PCI_DEVICE_ID_CAFE.
    EFS: Don't set f_fsid in statfs().

    Linus Torvalds
     
  • Merges oprofile, timers/hpet, x86/traps, x86/time, and x86/core misc items.

    * 'x86-core-v4-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (132 commits)
    x86: change early_ioremap to use slots instead of nesting
    x86: adjust dependencies for CONFIG_X86_CMOV
    dumpstack: x86: various small unification steps, fix
    x86: remove additional_cpus
    x86: remove additional_cpus configurability
    x86: improve UP kernel when CPU-hotplug and SMP is enabled
    dumpstack: x86: various small unification steps
    dumpstack: i386: make kstack= an early boot-param and add oops=panic
    dumpstack: x86: use log_lvl and unify trace formatting
    dumptrace: x86: consistently include loglevel, print stack switch
    dumpstack: x86: add "end" parameter to valid_stack_ptr and print_context_stack
    dumpstack: x86: make printk_address equal
    dumpstack: x86: move die_nmi to dumpstack_32.c
    traps: x86: finalize unification of traps.c
    traps: x86: make traps_32.c and traps_64.c equal
    traps: x86: various noop-changes preparing for unification of traps_xx.c
    traps: x86_64: use task_pid_nr(tsk) instead of tsk->pid in do_general_protection
    traps: i386: expand clear_mem_error and remove from mach_traps.h
    traps: x86_64: make io_check_error equal to the one on i386
    traps: i386: use preempt_conditional_sti/cli in do_int3
    ...

    Linus Torvalds
     
  • Original idea for this from a patch by Rodolfo Giometti which merges various
    bits of PPS support

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Drop the kernel lock further and also correct cases where we set rc to an
    error code, and then return 0

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • get_current_tty now does internal locking and returns a referenced object,
    thus our use of tty_mutex here can go away.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • drivers/char/tty_io.c:1413:17: warning: symbol 'buf' shadows an earlier one
    drivers/char/tty_io.c:1379:20: originally declared here

    Signed-off-by: Jason Wessel
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Jason Wessel
     
  • The multiple drivers share the minor space occupied by a particular major
    number, the actual index within the device name's space is indicated by
    the tty_driver->name_base + uart_port->line

    Another usable formula is (uart_driver->minor - MINOR_BASE) + port->line

    Use those to print the device names properly in such situations in
    serial_core.c and 8250.c

    Signed-off-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    David S. Miller
     
  • Closes bug #11408 by checking the card index range for command 0
    Fixes the ioctl to return ENOTTY which is correct for unknown ioctls

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Remove/fix some bogus NULL checks, comment some locking etc

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Many tty drivers contain 'can't happen' checks against NULL pointers passed
    in by the tty layer. These have never been possible to occur. Even more
    importantly if they ever do occur we want to know as it would be a serious
    bug.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Stephen's fixes reminded me that gigaset is still rather broken so fix it up
    a bit

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Today's linux-next build (x86_64 allmodconfig) failed like this:

    /drivers/char/tty_ioctl.c: In function 'change_termios':
    drivers/isdn/capi/capi.c:1234: error: implicit declaration of function 'n_tty_ioctl'
    drivers/isdn/gigaset/ser-gigaset.c: In function 'gigaset_tty_ioctl':
    drivers/isdn/gigaset/ser-gigaset.c:648: error: implicit declaration of function 'n_tty_ioctl'

    Introduced by commit 686b5e4aea05a80e370dc931b7f4a8d03c80da54
    ("tty-move-canon-specials"). I added the following patch (which may not
    be correct).

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • Move the set up on ldisc change into the ldisc
    Move the INQ/OUTQ cases into the driver not in shared ioctl code where it
    gives bogus answers for other ldisc values

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Copy the simplification from the pty unix98 special case to the generic one.
    This allows us to kill off driver->termios_locked entirely which is nice. We
    have to whack bits of the cris driver as it meddles in places it shouldn't
    providing its own arrays that were never used anyway.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • We need both termios and termios_locked so allocate them as one

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • The updating and moving around of the pty code added a bug where both the
    helper and caller free the main tty struct (the pty driver must free the
    o_tty pair itself however).

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • We've done the heavy lifting now its time to mop up a bit

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • When creating a new pty, save the pty's inode in the tty->driver_data.
    Use this inode in pty_kill() to identify the devpts instance. Since
    we now have the inode for the pty, we can skip get_node() lookup and
    remove the unused get_node().

    TODO:
    - check if the mutex_lock is needed in pty_kill().

    Signed-off-by: Sukadev Bhattiprolu
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • devpts_pty_new() is called when setting up a new pty and would not
    will not have an existing dentry or inode for the pty. So don't bother
    looking for an existing dentry - just create a new one.

    Signed-off-by: Sukadev Bhattiprolu
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • As pointed out by H. Peter Anvin, since the inode for the pty is known,
    we don't need to look it up.

    Signed-off-by: Sukadev Bhattiprolu
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • Pass-in 'inode' or 'tty' parameter to devpts interfaces. With multiple
    devpts instances, these parameters will be used in subsequent patches
    to identify the instance of devpts mounted. The parameters also help
    simplify devpts implementation.

    Changelog[v3]:
    - minor changes due to merge with ttydev updates
    - rename parameters to emphasize they are ptmx or pts inodes
    - pass-in tty_struct * to devpts_pty_kill() (this will help
    cleanup the get_node() call in a subsequent patch)

    Signed-off-by: Sukadev Bhattiprolu
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • Move tty_driver_lookup_tty() and tty_reopen() from tty_init_dev()
    into tty_open() (one of the two callers of tty_init_dev()). These
    calls are not really required in ptmx_open(), the other caller,
    since ptmx_open() would be setting up a new tty.

    Changelog[v2]:
    - remove the lookup and reopen calls from ptmx_open
    - merge with recent changes to ttydev tree

    Signed-off-by: Sukadev Bhattiprolu
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • The majority of the remaining init_dev code is pty special cases. We
    refactor this code into the driver->install method.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Original suggestion and proposal from Sukadev Bhattiprolu.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • We have the lookup operation abstracted which is nice for pty cleanup but
    we really want to abstract the add/remove entries as well so that we can
    pull the pty code out of the tty core and create a clear defined interface
    for the tty driver table.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Fix up the naming, style and extract some bits of code into the driver
    specific code

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Move the 'find-tty' and 'fast-track-open' parts of init_dev() to
    separate functions.

    Signed-off-by: Sukadev Bhattiprolu
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • Carry on pushing code out of tty_io when it belongs to other drivers. I'm
    not 100% happy with some of this and it will be worth revisiting some of the
    exports later when the restructuring work is done.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Right now there are various drivers that try to use tty->count to know when
    they get the final close. Aristeau Rozanski showed while debugging the vt
    sysfs race that this isn't entirely safe.

    Instead of driver side tricks to work around this introduce a shutdown which
    is called when the tty is being destructed. This also means that the shutdown
    method is tied into the refcounting.

    Use this to rework the console close/sysfs logic.

    Remove lots of special case code from the tty core code. The pty code can now
    have a shutdown() method that replaces the special case hackery in the tree
    free up paths.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • For hysterical raisins the vt layer drops and retakes locks in the write
    method. This is a left over from the days when user/kernel data was passed
    directly to the tty not pre-buffered.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • The open path for ptmx slaves is via the ptmx device. Opening them any
    other way is not allowed. Vegard Nossum found that previously this was not
    the case and mknod foo c 128 42; cat foo would produce nasty diagnostics

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox