Input: constify drivers/char/keyboard.c

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: iforce - use ENOSPC instead of ENOMEM

Use -ENOSPC instead of -ENOMEM when the iforce device doesn't have
enough free memory for the new effect.  All other drivers are using
-ENOSPC, so this makes the behaviour coherent.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: fix accuracy of fixp-arith.h

Add the value of cos(90) = 0 to the table.  This also moves the results so
that sin(x) == sin(180-x) is true as expected.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
kbuild: obj-dirs is calculated incorrectly if hostprogs-y is defined

When Makefile.host is included, $(obj-dirs) is subjected to the
addprefix operation for the second time.  Prefix only needs to be added
to the newly added directories, but not to those that came from
Makefile.lib.

This causes the build system to create unneeded empty directories in the
build tree when building in a separate directory.  For instance,
lib/lib/zlib_inflate is created in the build tree.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kbuild: fix make rpm for powerpc

The default target for most powerpc platforms is zImage.  The
zImage however is in arch/powerpc/boot and the mkspec script
was set up to get the kernel from the top level of the kernel
tree.  This patch copies vmlinux to arch/powerpc/boot and then
copies the kernel to the tmp directory so the rpm can be made.

Signed-off-by: Mike Wolf <mjw@us.ibm.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kbuild: ignore smp_locks section warnings from init/exit code

Add ".smp_locks" section to whitelist as being safe from
init and exit sections.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kbuild: fix false section mismatch with ARCH=um build

Ignoring references to .init.text, .exit.text from the .plt section brought
the false positives down to two warnings for a defconfig build of ARCH=um
on x86_64.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: improve config load/save output

During loading special case the first common case (.config), be silent about
it and otherwise mark it as a change that requires saving.  Instead output
that the file has been changed.  IOW if conf does nothing (special), it's
silent.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: fix .config dependencies

This fixes one of the worst kbuild warts left - the broken dependencies used
to check and regenerate the .config file.  This was done via an indirect
dependency and the .config itself had an empty command, which can cause make
not to reread the changed .config file.

Instead of this we generate now a new file include/config/auto.conf from
.config, which is used for kbuild and has the proper dependencies.  It's also
the main make target now for all files generated during this step (and thus
replaces include/linux/autoconf.h).

This also means we can now relax the syntax requirements for the .config file
and we don't have to rewrite it all the time, i.e.  silentoldconfig only
writes .config now when it's necessary to keep it in sync with the Kconfig
files and even this can be suppressed by setting the environment variable
KCONFIG_NOSILENTUPDATE, so the update can (and must) be done manually.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: remove SYMBOL_{YES,MOD,NO}

The SYMBOL_{YES,MOD,NO} are not really used anymore (they were more used be
the cml1 converter), so just remove them.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: allow multiple default values per symbol

Extend struct symbol to allow storing multiple default values, which can be
used to hold multiple configurations.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: allow loading multiple configurations

Extend conf_read_simple() so it can load multiple configurations.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: integrate split config into silentoldconfig

Now that kconfig can load multiple configurations, it becomes simple to
integrate the split config step, by simply comparing the new .config file with
the old auto.conf (and then saving the new auto.conf).  A nice side effect is
that this saves a bit of disk space and cache, as no data needs to be read
from or saved into the splitted config files anymore (e.g.  include/config is
now 648KB instead of 5.2MB).

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: move .kernelrelease

This moves the .kernelrelease file into include/config directory.  Remove its
generation from the config step, if the config step doesn't leave a proper
.config behind, it triggers a call to silentoldconfig.  Instead its generation
can be done via proper dependencies.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: add symbol option config syntax

This adds the general framework to the parser to define options for config
symbols with a syntax like:

config FOO
	option bar[="arg"]

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: add defconfig_list/module option

This makes it possible to change two options which were hardcoded sofar.
1. Any symbol can now take the role of CONFIG_MODULES
2. The more useful option is to change the list of default file names,
   which kconfig uses to load the base configuration if .config isn't
   available.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: Add search option for xconfig

Implement a simple search request for xconfig.  Currently the capabilities are
rather simple (the same as menuconfig).

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: finer customization via popup menus

This allows to configure every symbol list and info window separately via a
popup menu, these settings are also separately saved and restored.  Cleanup
the ConfigSettings class a bit to reduce the number of #ifdef.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: create links in info window

Extend the expression print helper function to allow customization of the
symbol output and use it to add links to the info window.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
kconfig: jump to linked menu prompt

If clicking on of the links, which leads to a visible prompt, jump to it in
the symbol list.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>