Commit Graph

288182 Commits (3c3c10bba1e4ccb75b41442e45c1a072f6cded19)

Author SHA1 Message Date
Artem Bityutskiy 3c3c10bba1 mtd: add leading underscore to all mtd functions
This patch renames all MTD functions by adding a "_" prefix:

mtd->erase -> mtd->_erase
mtd->read_oob -> mtd->_read_oob
...

The reason is that we are re-working the MTD API and from now on it is
an error to use MTD function pointers directly - we have a corresponding
API call for every pointer. By adding a leading "_" we achieve the following:

1. Make sure we convert every direct pointer users
2. A leading "_" suggests that this interface is internal and it becomes
   less likely that people will use them directly
3. Make sure all the out-of-tree modules stop compiling and the owners
   spot the big API change and amend them.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:20:01 +01:00
Brian Norris a6c22850d2 jffs2: update to new MTD interface
There were a few instances of the old MTD interface remaining for JFFS2. We
fix one error that shows up (only when CONFIG_JFFS2_FS_WRITEBUFFER is not
defined) like this:

  fs/jffs2/read.c: In function 'jffs2_read_dnode':
  fs/jffs2/read.c:36:8: error: 'struct mtd_info' has no member named 'read'
  fs/jffs2/read.c:112:8: error: 'struct mtd_info' has no member named 'read'
  ...

We also simply remove two macros that are not in use, were not updated to
the new MTD interface, and don't even utilize the old interface properly.
(That means they weren't used since commit 8593fbc6, year 2006; almost 6
years ago, for those who don't want to do the math)

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:19:38 +01:00
Artem Bityutskiy c382fb43df romfs: switch to new MTD API
We have changed the MTD API and now ROMFS should use 'mtd_read()' instead
of mtd->read().

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:19:30 +01:00
Artem Bityutskiy f02654504d jffs2: remove direct mtd->point reference
Commit 10934478e4 did not remove now useless
"if (mtd->point)" check mistakingly - let's kill it now.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:19:21 +01:00
Mike Dunn 570469f3bd mtd: nand: add support for diskonchip G4 nand flash device
This patch adds a driver for the M-Sys / Sandisk diskonchip G4 nand flash found
in various smartphones and PDAs, among them the Palm Treo680, HTC Prophet and
Wizard, Toshiba Portege G900, Asus P526, and O2 XDA Zinc.  It was tested on the
Treo 680, but should work generically.

Since v3, this patch adds power management functions, a scan of the factory bad
block table during initialization, several fixes, and more extensive testing.
Also, the platform data header file, which only contained partitioning
information, was removed.  Command-line partitioning can be used, at least until
an mtd parser is written for the saftl format with which these chips are
shipped.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:18:31 +01:00
Stefan Roese 58edc904bb mtd: minor coding style cleanup in mtdpart.c
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:16:24 +01:00
Axel Lin c9d1b75293 mtd: convert drivers/mtd/* to use module_spi_driver()
This patch converts the drivers in drivers/mtd/* to use the
module_spi_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:16:18 +01:00
Brian Norris df698621a5 mtd: nand: move SCANLASTPAGE handling to the correct code block
As nand_default_block_markbad() is becoming more complex, it helps to
have code appear only in its relevant codepath(s). Here, the calculation
of `ofs' based on NAND_BBT_SCANLASTPAGE is only useful on paths where we
write bad block markers to OOB. We move the condition/calculation closer
to the `write' operation and update the comment to more correctly
describe the operation.

The variable `wr_ofs' is also used to help isolate our calculation of
the "write" offset from the usage of `ofs' to represent the eraseblock
offset. This will become useful when we reorder operations in the next
patch.

This patch should make no functional change.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:16:04 +01:00
Brian Norris f0e0c09b88 mtd: mtdoops: kill Kconfig usage instructions
The mtdoops usage instructions found in Kconfig have been incorrect
since:

    commit 2e386e4bac
    mtd: mtdoops: refactor as a kmsg_dumper

mtdoops no longer uses a console. Now, if you build it into your kernel,
you add something like the following to your command line to select
partition X as your logging partition:

    mtdoops.mtddev=X

Anyway, it seems better to leave the documentation out of Kconfig.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:15:37 +01:00
Russell King - ARM Linux 4aa3179c07 mtd: sa11x0: remove definitions and code left for documentation purposes
/*
 * This is here for documentation purposes only - until these people
 * submit their machine types.  It will be gone January 2005.
 */

It's now seven years after that date, so let's remove this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:15:20 +01:00
Russell King - ARM Linux 41515ca262 mtd: sa11x0: Remove shutdown handler
Commit c4a9f88daf ([MTD] [NOR] fix ctrl-alt-del can't reboot for
intel flash bug) interferes with this work-around, causing MTD to
issue this warning:

	Flash device refused suspend due to active operation (state 0)

The commit makes our work-around in the map driver unnecessary, so
let's remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:15:01 +01:00
Shiraz Hashim 495c47d799 mtd: spear_smi: release memory region during remove
Driver must cleanup all held resources during remove. It wasn't
releasing requested memory region.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:14:36 +01:00
Shiraz Hashim f18dbbb1bf mtd: ST SPEAr: Add SMI driver for serial NOR flash
SPEAr platforms (spear3xx/spear6xx/spear13xx) provide SMI (Serial Memory
Interface) controller to access serial NOR flash. SMI provides a simple
interface for SPI/serial NOR flashes and has certain inbuilt commands
and features to support these flashes easily. It also makes it possible
to map an address range in order to directly access (read/write) the SNOR
over address bus. This patch intends to provide serial nor driver support
for spear platforms which are accessed through SMI.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:14:16 +01:00
Brian Norris 661a08327d mtd: nand: correct comment on nand_chip badblockbits
The description for badblockbits is incorrect. I think someone just made
up a false description on the spot to satisfy some kerneldoc warning.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:12:42 +01:00
Brian Norris 8544331998 mtd: nand: differentiate 1- vs. 2-byte writes when marking bad blocks
It seems that we have developed a bad-block-marking "feature" out of
pure laziness:

  "We write two bytes per location, so we dont have to mess with 16 bit
  access."

It's relatively simple to write a 1 byte at a time on x8 devices and 2
bytes at a time on x16 devices, so let's do it.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:12:34 +01:00
Brian Norris cdbec05086 mtd: nand: fix SCAN2NDPAGE check for BBM
nand_block_bad() doesn't check the correct pages when
NAND_BBT_SCAN2NDPAGE is enabled. It should scan both the OOB region of
both the 1st and 2nd page of each block.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:50 +01:00
Brian Norris 009184296d mtd: nand: erase block before marking bad
Many NAND flash systems (especially those with MLC NAND) cannot be
reliably written twice in a row. For instance, when marking a bad block,
the block may already have data written to it, and so we should attempt
to erase the block before writing a bad block marker to its OOB region.

We can ignore erase failures, since the block may be bad such that it
cannot be erased properly; we still attempt to write zeros to its spare
area.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:34 +01:00
Julia Lawall 152b861622 mtd: onenand: samsung: add missing iounmap
Add missing iounmap in error handling code, in a case where the function
already preforms iounmap on some other execution path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
statement S,S1;
int ret;
@@
e = \(ioremap\|ioremap_nocache\)(...)
... when != iounmap(e)
if (<+...e...+>) S
... when any
    when != iounmap(e)
*if (...)
   { ... when != iounmap(e)
     return ...; }
... when any
iounmap(e);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:20 +01:00
Fabio Estevam 335a5f409e mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined
Fix the following build warning:

drivers/mtd/mtdcore.c: In function ‘mtd_release’:
drivers/mtd/mtdcore.c:110: warning: unused variable ‘mtd’

This happens when neither CONFIG_MTD_CHAR nor CONFIG_MTD_CHAR_MODULE are defined.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:16 +01:00
Alexander Stein 70d5098a4b mtd: mtdblock: call mtd_sync() only if opened for write
Because it is useless to call it if the device is opened in R/O mode, and also
harmful: on CFI NOR flash it may block for long time waiting for erase
operations to complete is another partition with a R/W file-system on this
chip.

Artem Bityutskiy: write commit message, amend the patch to match the latest
tree (we use mtd_sync(), not mtd->sync() nowadays).

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:11 +01:00
Xi Wang 2ff5e1532d mtd: pmc551: fix signedness bug in init_pmc551()
Since "length" is a u32, the error handling below didn't work when
fixup_pmc551() returns -ENODEV.

	if ((length = fixup_pmc551(PCI_Device)) <= 0)

This patch changes both the type of "length" and the return type of
fixup_pmc551() to int.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:07 +01:00
Ira W. Snyder 30ec5a2cb1 mtd: cfi: AMD/Fujitsu compatibles: add panic write support
This allows the mtdoops driver to work on flash chips using the
AMD/Fujitsu compatible command set.

As the code comments note, the locks used throughout the normal code
paths in the driver are ignored, so that the chance of writing out the
kernel's last messages are maximized.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:03 +01:00
Linus Torvalds 192cfd5877 Linux 3.3-rc6 2012-03-03 17:08:09 -08:00
Linus Torvalds 8482a0abe9 SCSI fixes on 20120303
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPUrf8AAoJEDeqqVYsXL0Ma0cH/1hcV4G3U7ZNbKJsijl7eowP
 GON1pme9XvUIHxWibIEZhUaaycWhN3oaShdEO+IAYSVoRSC6pu1H+/Be8VgvVpdT
 +1N9a41sXmuMeTadwfdZJ6k0Gs9gtbuxfvO4Z6WRbrpjik5S/3ZP3A/US8jESbCW
 rOK9evTUCs+rBFXiyOwyz3Li335/zEbq3E3N14VgbA05vYvw3+AuNQ0e8zS2A9/D
 3yLiQfIPhVZmH5majf+4qqyvBqQ0Jacj5TZrKyRehYZpB1c+fHwTDRYBko9vWdEH
 Tojk/mz3hPu48BNJyawb0Kemei+hNGKyejj8jbjBT1cb8/FTOGeZsYRa83YA6Hg=
 =joKr
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

SCSI fixes from James Bottomley:
 "There's just a single fix in here: the osd max device number fix."

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] osd_uld: Bump MAX_OSD_DEVICES from 64 to 1,048,576
2012-03-03 16:42:30 -08:00
Linus Torvalds 233ba2c5ff PARISC fixes on 20120303
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPUqnkAAoJEDeqqVYsXL0MyTwH/14R9sIt+IdQgMGje6Dys6U1
 3wxmNHcxNBB461212i+XVToH72GiPtUyWY8Q3LT+Qcq4Rab9oq8wDffxdgflDLja
 sZq9COLR8dmXJM0hduyuysCiNIlmuURV20uIMsDbYutBVtAKKqMd7ZrJBmkVh7xT
 slBJf+0lcD5IBYPYwf8lbxAI7E/C5TarMCIZk4z21I8ovF321RlGcyyo6NM62q/P
 wvLw4bJuW7nJa3q3B7BznzBcoHLmzo9tiY+CbtQlGhSdasDKJ8HuAegTVyofl6s8
 0/RTvaUcqTWUlFxXzLVDT+MCWAUP4GFR66tR2T5tygRi9st70TcpMzISiyZzKi8=
 =WzAJ
 -----END PGP SIGNATURE-----

Merge tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6

PARISC fixes from James Bottomley:
 "This is a set of build fixes to get the cross compiled architecture
  testbeds building again"

* tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
  [PARISC] don't unconditionally override CROSS_COMPILE for 64 bit.
  [PARISC] include <linux/prefetch.h> in drivers/parisc/iommu-helpers.h
  [PARISC] fix compile break caused by iomap: make IOPORT/PCI mapping functions conditional
2012-03-03 16:33:51 -08:00
Linus Torvalds 001f3a4887 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/kvm: Fix Host-Only/Guest-Only counting with SVM disabled
2012-03-03 09:32:31 -08:00
Linus Torvalds 2ce3f2b3b1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull from Herbert Xu:
  "This push fixes a bug in mv_cesa that causes all hash operations
   that supply data on a final operation to fail."

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: mv_cesa - fix final callback not ignoring input data
2012-03-03 09:31:49 -08:00
Linus Torvalds ae942ae719 vfs: export full_name_hash() function to modules
Commit 5707c87f "vfs: uninline full_name_hash()" broke the modular
build, because it needs exporting now that it isn't inlined any more.

Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-02 19:40:57 -08:00
Linus Torvalds 62d222b8c8 Four commits since v3.3-rc5:
15d1ad0 hwmon: (f75375s) Catch some attempts to write to r/o registers
 b17d656 hwmon: (f75375s) Properly map the F75387 automatic modes to pwm_enable
 edeea10 hwmon: (f75375s) Make pwm*_mode writable for the F75387
 331255d hwmon: (f75375s) Fix writes to the pwm* attribute for the F75387
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJPUShhAAoJEMsfJm/On5mBm74P/2fQB4aY+iseQRpnNjido+W1
 FUGL/Kb2FcWafHRvoLE7ddsMccj4rrvIbe81ad8R/HI9LFC/fUZijLwQA5Zb0IO9
 RE5KG3kVy5B0x0c2eP+NgMhrNWerKBfh3fdVQXNiqtS+r1cU2Vq1JMm5gDMK/5we
 yyqnqm4WbmMhb4Droj19h365yvMd0sckmO0nXnA0vHMCFDjNIFg6hf4IT7C0tGRM
 tFMhGiUJciDur7eoOhOhVWUF6hz2ug38stllO0s7E+5D97gU7VyRrdTh7qqomiKT
 CblZshuQXsRmwiRPHBAXFYgFTuPZf8SptaivhzIj7VDKqh5w7cjlXGmAJt7JP09s
 Pi4tTupUC7NPrQncM00LrvulFXJAVmucv9K7POnEjrJbAAH7msRNSMt+7JYrgsR4
 kRZQIQsosvquLcwR0GShypCi3G1g81CKTwfO4nHcbioPeFWSOM2a4YWjALmCLgUr
 FXtICHFJbTEPGbCkTfYwN5Rt7cwZbHg7VBX5oJsVsxv8YNG7Lc2mnDf1V1vGu88R
 O4WILvqeUIfveYbt8gucijJGTiaxNbcOmLgRVh5/LWgjHe1SSVC9EIK6lLtrtERC
 i3KdJ32Aigsoj7jDaEcCkOatyy5VK14xB1Y16KpbOOU2ITT7TT41SKWLeW6vCarE
 HA0WCE+4tPdYsEElU4K/
 =e4hU
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

hhwmon fixes for 3.3-rc6 from Guenter Roeck:

These patches are necessary for correct operation and management of
F75387.

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (f75375s) Catch some attempts to write to r/o registers
  hwmon: (f75375s) Properly map the F75387 automatic modes to pwm_enable
  hwmon: (f75375s) Make pwm*_mode writable for the F75387
  hwmon: (f75375s) Fix writes to the pwm* attribute for the F75387
2012-03-02 15:21:48 -08:00
Linus Torvalds d085a09cf3 fbdev fixes for 3.3
It includes:
 - two fixes for OMAP HDMI
 - one fix to make new OMAP functions behave as they are supposed to
 - one Kconfig dependency fix
 - two fixes for viafb for modesetting on VX900 hardware
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPUTAuAAoJECSVL5KnPj1PwIoP/3BosrH3mE7hDAXLI6EoXTmo
 SaePt271FV+RqlG5Tjd07IDceXaCz3zf+ZyS9sKZXvGi9QNMKKs52Ah0PeWDfalM
 MJVtRh2FBvaSKFvSqKjN3Fzv+bHpJZwekQBLDaHYHNdtQjWNW8Nnkth6n9xNDwau
 Xp5owI/p9ZECoCcj/D17LF59t8kiynqKdDOmhzZ1bp/c1LgL4waSXnP5/ToQxmcL
 zjUrvR4u3RNDqTxJmScswyDZq4u8qLx4fovhScoPe1OpU2cVXV69UdivzoF4A30c
 t02ZPEE+NM5tFfPMtUNn3zCEN+I893e4ABHoZlDfzS8Ab7JJjnDFduvUzJdSPa8H
 3kMZH7YmQhs1KhbrEcZPeBuxmZaNXpojRYmlbnw7w+kHtcaxVUxhR87TI8kYZIaS
 oqsTXmO+f9T8cMy3WbhUylj+uUpcBQYbIHd4QUhGFvylU24mrrJJQtwsPTFTElE7
 CBKPavbtFMkQepeXRX0Sig/xwVcKA7UUfdvirsD4BjfxZqsOxWeBCQN/scEDcSwo
 KOsLN4Kc4T3On3vNHc2fdq4f+sd2rlGeB9tH/NRtt7UBjGhxK+9lD5YmiavUopyH
 ectsoEMXg9FMQS1GwmQZwQx7r1QXRylBRgrHV/l1XwBU/QfQp3WFqBrVTFZkw4rg
 9U0wHlmQYnnU66rUChUt
 =+UnE
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-fixes-for-3.3-2' of git://github.com/schandinat/linux-2.6

fbdev fixes for 3.3 from Florian Tobias Schandinat

It includes:
 - two fixes for OMAP HDMI
 - one fix to make new OMAP functions behave as they are supposed to
 - one Kconfig dependency fix
 - two fixes for viafb for modesetting on VX900 hardware

* tag 'fbdev-fixes-for-3.3-2' of git://github.com/schandinat/linux-2.6:
  OMAPDSS: APPLY: make ovl_enable/disable synchronous
  OMAPDSS: panel-dvi: Add Kconfig dependency on I2C
  viafb: fix IGA1 modesetting on VX900
  viafb: select HW scaling on VX900 for IGA2
  OMAPDSS: HDMI: hot plug detect fix
  OMAPDSS: HACK: Ensure DSS clock domain gets out of idle when HDMI is enabled
2012-03-02 15:21:15 -08:00
Linus Torvalds 5e8063d758 sound fixes for 3.3-rc6
This contains again regression fixes for various HD-audio and ASoC
 regarding SSI and dapm shutdown path.  In addition, a minor azt3328
 fix and the correction of the new jack-notification strings in HD-audio.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPURbWAAoJEGwxgFQ9KSmkgqsQAJSt2wHCAtsOWV/1KO814AQQ
 S6VL1/RAzy0HKI2R4Dv9+27Jxf2k74IozD46YgpWvYcuq5nYGjMp3aiQfw8Qdoi6
 8VmzRfbyByKH669Q4nkuQqFI5icHMxWHVLpzue6WJQT2H/WbeqP9nWlE+Y12kSss
 hf3CznOP434Ea1atJyRf9hSiUAFH0XlLtJJA9AL1gsZvYqrSE5MIPnCGw/4rmKVh
 20CTEP03QtNByHWR/Ago23boYNyejGV61bmYQo5c9QnkdLTxbF3FXW2BMzQlSy6u
 EhKCvD2TlhAByiTZ3MPn/YLup4nWNqLK0gAwEBShmRfhD0ww442hKJWUvSnINeV+
 V6GbKlkfaYlsDSlwDNWksw1lym0sjQv0WNrI0VnzSWG3UEToCh1GTshyKdmZC/Mt
 9Wy4l3lxciFfUHsQk68E1w8FTRSovr+8NkcY6zOj1Y77q/PEvmw+A5M5mRuNApy4
 T9wkjfkqzTjNoHh0IBzbyRI9K2B5vtQKw8OlpWsz+6qdwbY/fNrm71BQeT1Wx5mP
 9wAxLC0KOV0+FngfesNYSpBwW4eK2tSsSspC/0y5ElYpT58w3Zp5xqb6Iz9Yv+M+
 QGNgdyWyAO+kzTblZ3tcnbQoejk7zzzk4d31yUygNVejad4XG6GbopS20dzg8kIJ
 DlQTryZbw0OCnQMCT1SX
 =uTH2
 -----END PGP SIGNATURE-----

Merge tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

sound fixes for 3.3-rc6 from Takashi Iwai

This contains again regression fixes for various HD-audio and ASoC
regarding SSI and dapm shutdown path.  In addition, a minor azt3328
fix and the correction of the new jack-notification strings in HD-audio.

* tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Kill hyphenated names
  ALSA: hda - Add a fake mute feature
  ALSA: hda - Always set HP pin in unsol handler for STAC/IDT codecs
  ALSA: azt3328 - Fix NULL ptr dereference on cards without OPL3
  ALSA: hda/realtek - Fix resume of multiple input sources
  ASoC: i.MX SSI: Fix DSP_A format.
  ASoC: dapm: Check for bias level when powering down
2012-03-02 15:20:41 -08:00
Linus Torvalds 200e9ef7ab vfs: split up name hashing in link_path_walk() into helper function
The code in link_path_walk() that finds out the length and the hash of
the next path component is some of the hottest code in the kernel.  And
I have a version of it that does things at the full width of the CPU
wordsize at a time, but that means that we *really* want to split it up
into a separate helper function.

So this re-organizes the code a bit and splits the hashing part into a
helper function called "hash_name()".  It returns the length of the
pathname component, while at the same time computing and writing the
hash to the appropriate location.

The code generation is slightly changed by this patch, but generally for
the better - and the added abstraction actually makes the code easier to
read too.  And the new interface is well suited for replacing just the
"hash_name()" function with alternative implementations.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-02 14:49:24 -08:00
Linus Torvalds 5707c87f20 vfs: clarify and clean up dentry_cmp()
It did some odd things for unclear reasons.  As this is one of the
functions that gets changed when doing word-at-a-time compares, this is
yet another of the "don't change any semantics, but clean things up so
that subsequent patches don't get obscured by the cleanups".

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-02 14:47:15 -08:00
Linus Torvalds 0145acc202 vfs: uninline full_name_hash()
.. and also use it in lookup_one_len() rather than open-coding it.

There aren't any performance-critical users, so inlining it is silly.
But it wouldn't matter if it wasn't for the fact that the word-at-a-time
dentry name patches want to conditionally replace the function, and
uninlining it sets the stage for that.

So again, this is a preparatory patch that doesn't change any semantics,
and only prepares for a much cleaner and testable word-at-a-time dentry
name accessor patch.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-02 14:32:59 -08:00
Linus Torvalds 8966be9030 vfs: trivial __d_lookup_rcu() cleanups
These don't change any semantics, but they clean up the code a bit and
mark some arguments appropriately 'const'.

They came up as I was doing the word-at-a-time dcache name accessor
code, and cleaning this up now allows me to send out a smaller relevant
interesting patch for the experimental stuff.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-02 14:23:30 -08:00
Nikolaus Schulz 15d1ad0cc9 hwmon: (f75375s) Catch some attempts to write to r/o registers
It makes no sense to attempt to manually configure the fan in auto mode,
or set the duty cycle directly in closed loop mode.  The corresponding
registers are then read-only.  If the user tries it nonetheless, error out
with EINVAL instead of silently doing nothing.

Signed-off-by: Nikolaus Schulz <mail@microschulz.de>
[guenter.roeck@ericsson.com: Minor formatting cleanup]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-02 12:02:23 -08:00
Nikolaus Schulz b17d6561ac hwmon: (f75375s) Properly map the F75387 automatic modes to pwm_enable
The F75387 supports automatic fan control using either PWM duty cycle or
RPM speed values.  Make the driver detect the latter mode, and expose the
different modes in sysfs as per pwm_enable, so that the user can switch
between them.

The interpretation of the pwm_enable attribute for the F75387 is adjusted
to be a superset of those values used for similar Fintek chips which do
not support automatic duty mode, with 2 mapping to automatic speed mode,
and moving automatic duty mode to the new value 4.

Toggling the duty mode via pwm_enable is currently denied for the F75387,
as the chip then simply reinterprets the fan configuration register values
according to the new mode, switching between RPM and PWM units, which
makes this a dangerous operation.

This patch introduces a new pwm mode into the driver. This is necessary
because the new mode (automatic pwm mode, 4) may already be enabled by the
BIOS, and the driver should not break existing functionality. This was seen
on at least one board.

Signed-off-by: Nikolaus Schulz <mail@microschulz.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-02 11:56:43 -08:00
Linus Torvalds 2273d5ccb8 Merge branches 'core-urgent-for-linus', 'perf-urgent-for-linus' and 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pulling latest branches from Ingo:

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  memblock: Fix size aligning of memblock_alloc_base_nid()

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf probe: Ensure offset provided is not greater than function length without DWARF info too
  perf tools: Ensure comm string is properly terminated
  perf probe: Ensure offset provided is not greater than function length
  perf evlist: Return first evsel for non-sample event on old kernel
  perf/hwbp: Fix a possible memory leak

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  CPU hotplug, cpusets, suspend: Don't touch cpusets during suspend/resume
2012-03-02 11:38:43 -08:00
H. Peter Anvin 5189fa19a4 regset: Return -EFAULT, not -EIO, on host-side memory fault
There is only one error code to return for a bad user-space buffer
pointer passed to a system call in the same address space as the
system call is executed, and that is EFAULT.  Furthermore, the
low-level access routines, which catch most of the faults, return
EFAULT already.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@hack.frob.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-02 11:38:15 -08:00
H. Peter Anvin c8e252586f regset: Prevent null pointer reference on readonly regsets
The regset common infrastructure assumed that regsets would always
have .get and .set methods, but not necessarily .active methods.
Unfortunately people have since written regsets without .set methods.

Rather than putting in stub functions everywhere, handle regsets with
null .get or .set methods explicitly.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@hack.frob.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-02 11:38:15 -08:00
Joerg Roedel 1018faa6cf perf/x86/kvm: Fix Host-Only/Guest-Only counting with SVM disabled
It turned out that a performance counter on AMD does not
count at all when the GO or HO bit is set in the control
register and SVM is disabled in EFER.

This patch works around this issue by masking out the HO bit
in the performance counter control register when SVM is not
enabled.

The GO bit is not touched because it is only set when the
user wants to count in guest-mode only. So when SVM is
disabled the counter should not run at all and the
not-counting is the intended behaviour.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Avi Kivity <avi@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: stable@vger.kernel.org # v3.2
Link: http://lkml.kernel.org/r/1330523852-19566-1-git-send-email-joerg.roedel@amd.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-02 12:16:39 +01:00
Takashi Iwai e49a3434f1 ALSA: hda - Kill hyphenated names
Kill hyphens from "Line-Out" name strings, as suggested by Mark Brown.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-02 08:59:23 +01:00
Ingo Molnar 5d85d97c9f perf/urgent fixes.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPTpj0AAoJENZQFvNTUqpAp0MP/AtR30eyEKl6zKPB6OlegcgY
 /RF0nIqVz6gCdlERReoF/zIzOQkk/ltHSMhhXgByfSALZJGDFyy3VomnN3ReOE4t
 dCeQIlNtKYHvT6EbWB5cGWevxS+hGV8C78MQNai7VQuoWGS5FucTgI6XyF4+0WE4
 n22elCQszLM6ofC1OqkZ0alfA5ypEe0kN7RVqSdXYBVxPgapj0Sc8u4SlgL/a6pn
 eb7EnhB7Ue2+bXI3JnPwoy7agqJC/rWgDWb1pYJCc+tGSZ1SG2UAxcasD1syWRgP
 k8Ocli8oNfdLYguAAyNnifUwMJEGASEEeDo9FtQp5JumI78HpCppfAvQnrJ4jVT1
 gGlXt1GLVBw5sgr6cLT77aLVKW48VGJWbzH3ON/R28RK5wuk2wOkPJRHMh6uo3ID
 lqT12W3T0bRCWWogP5UrWDfMR1zOi5a3ok5nvPjmZiuVygkRph8Cvcmwx36gQRDV
 rf5+RvoqzxovLolYU50ZaYZkNJQOLMNa7d+TUHS4v9wEdpfDjykOiLZzg/GrBuFR
 gTslV3zOeHgRwEOXi9dHV6vIITSrshCVOzTzpYqw4/PsXpdjV3LVIWaac5/QByMP
 xbbjKpgaq2LILwuC/oYyniyB2X3S19E/6xpC7vVr1iPYmiDsSwtNLmgRCaNGE09t
 yP0XsZezFOnZP4V2lTI3
 =OU3v
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Various smaller perf/urgent fixes.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-02 08:40:45 +01:00
Linus Torvalds 1f033c1a6e Merge git://www.linux-watchdog.org/linux-watchdog
Watchdog updates from Wim Van Sebroeck:

* git://www.linux-watchdog.org/linux-watchdog:
  watchdog: fix GETTIMEOUT ioctl in booke_wdt
  watchdog: update maintainers git entry
  watchdog: Fix typo in pnx4008_wdt.c
  watchdog: Fix typo in Kconfig
  watchdog: fix error in probe() of s3c2410_wdt (reset at booting)
  watchdog: hpwdt: clean up set_memory_x call for 32 bit
2012-03-01 18:27:43 -08:00
Linus Torvalds 13fb2d1037 A simple, driver specific fix. This device isn't widely used outside of
Marvell reference boards most of which are probably used with their BSPs
 rather than with mainline so low risk.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPR6XBAAoJEBus8iNuMP3dvjgP/1DKa3TUSNze7BqCspdPxzLr
 DCxfkfCpdBGX97EE7VTjp7XyrnsSESg5LQ1/r8tvJqwqm3DtC1/AhiROhoSRIDFe
 mAerCTiZCGrJQUURUfAw07cq5yyM/F9Shz6TH1EoPn8e/Dtw23Rkb4PrXCUYXgG8
 3ecPAQ11dDo+bTO/jFvnKEMaa3PpL8EFu8UIaiCGmGDuAHXEr1OALF83tDOkbl/j
 J7MvW0XcyhQQ+/chCn7oV13k9mApbsohNi3tcQdlpl533Zlf06TxW00jpqtoZyMf
 aP3Cl71uHgkr9hjU310R2rsJ3zocBl+QT+rWmiJ89gm/bawgNkycKYA9Q9pnyvuM
 Eoo56E96oWLB1ld8gGzCVB1gxCLSOeewFEAsNxZEx4PVnaa373waOCkXGXTBqCTD
 MM/BgM4z4fa2IwsjlX+UO6cz3Zpkhfx7KpTOoxjM9gXh2ovKSn5TjmuwowMqWo0r
 B52nRs3liglV5O2q4eMSe2TXFkfaYO9TTKwmUMPl+o7WfmqmgUuCthFOzZG3S4BE
 sWClFq2ASHdAGHoytJyJHMfjvqX8egD61aVrAQua0r13EvgNuxAk2lkxrxojCZOG
 KP2lLd6b2NKlyUZIcD9CYPz30QHgmSe9cOhM2LSmvLkL1tmMgeMhLt+oCIkG5mcs
 Peds63YpiarhWd7IwToJ
 =HVC8
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull from Mark Brown:
 "A simple, driver specific fix.  This device isn't widely used outside
  of Marvell reference boards most of which are probably used with their
  BSPs rather than with mainline so low risk."

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: fix the ldo configure according to 88pm860x spec
2012-03-01 18:26:48 -08:00
Linus Torvalds a223c52280 Merge branch 'i2c-embedded/for-3.3' of git://git.pengutronix.de/git/wsa/linux-2.6
i2c bugfix from Wolfram Sang:
  "This patch fixes a wrong assumption in the mxs-i2c-driver about a
   command queue being done.  Without it, we have seen races when the
   bus was under load."

* 'i2c-embedded/for-3.3' of git://git.pengutronix.de/git/wsa/linux-2.6:
  i2c: mxs: only flag completion when queue is completely done
2012-03-01 18:24:52 -08:00
Linus Torvalds cfa5555cab Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
DRM fixes from Dave Airlie:
  intel: fixes for output regression on 965GM, an oops and a machine
  hang

  radeon: uninitialised var (that gcc didn't warn about for some reason)
  + a couple of correctness fixes.

  exynos: fixes for various things, drop some chunks of unused code.

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon/kms/vm: fix possible bug in radeon_vm_bo_rmv()
  drm/radeon: fix uninitialized variable
  drm/radeon/kms: fix radeon_dp_get_modes for LVDS bridges (v2)
  drm/i915: Remove use of the autoreported ringbuffer HEAD position
  drm/i915: Prevent a machine hang by checking crtc->active before loading lut
  drm/i915: fix operator precedence when enabling RC6p
  drm/i915: fix a sprite watermark computation to avoid divide by zero if xpos<0
  drm/i915: fix mode set on load pipe. (v2)
  drm/exynos: exynos_drm.h header file fixes
  drm/exynos: added panel physical size.
  drm/exynos: added postclose to release resource.
  drm/exynos: removed exynos_drm_fbdev_recreate function.
  drm/exynos: fixed page flip issue.
  drm/exynos: added possible_clones setup function.
  drm/exynos: removed pageflip_event_list init code when closed.
  drm/exynos: changed priority of mixer layers.
  drm/exynos: Fix typo in exynos_mixer.c
2012-03-01 18:23:43 -08:00
Linus Torvalds 6bba07c613 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  [S390] memory hotplug: prevent memory zone interleave
  [S390] crash_dump: remove duplicate include
  [S390] KEYS: Enable the compat keyctl wrapper on s390x
2012-03-01 18:22:55 -08:00
Takashi Iwai b399997008 A small fix for the SSI driver and a fix for system shutdown with modern
devices.  Most of the modern devices will never get shut down normally
 with a visible kernel log as the systems they're in tend not to shut
 down often and when they do it's usually in form factors that don't have
 a user visible console.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPT2d3AAoJEBus8iNuMP3d5Y0P/iM8j26/TQ27/5r9WroKKHXL
 BeIt+xT2hB1xuCf8KUMmq4JZUQQQZBz2mhlcR5oG93A5S6QmLXl8bXJ2qdmGb3KW
 YmtWo1kCMj44Z/mVt9u9lIy+EnlxrgogwCA/Ph3Fb+GppR+f27rXr87g3OaYEJgu
 1W1u9AYrmJ9SkWrjSxlihfQiQ7v4gojGQKrWsG6uFq4ZJIBDah9nqsfpvT1/XdeF
 ciijoSk1sRAHOz92MPDRvwPxVaWbyv4ehkE3O7Zckcm+8z0bBWL26U5Nq4thhIjz
 CCqhqSP/22XvJxOM6xQwnH3VmxyON+F7bOdmk9fZdwEIJ5zVpvK1gkBQSeykUn6F
 Ow6g5L2cH2azmswWCVsUt6+NjfnpaNI/g8+J/Jy9aDQbyx0LWeN89AUJBC+KCGUL
 YLAzzsx2e4cKcILx6PiDhDCkoPkszacPrsoWZWr5QvNc+32HQhXX/KEqUcYHhxGR
 N/b046oVzLjcAfOFDoSvER5G1Ep6wJCxgNKjo+b4uYk2UYQBt/haYqSjqQwFnRi1
 JjkC/FZjHTS4z1dexdSx5SGsRl+dDvr9rlmYtq+u/5SqLb+eq+iDUhberrgP6vGh
 P7Nkt9PEHzJ+ifqlmvJXyKf54mlozmS5MzDn9JopGnZjLp5QVHIVqdd+inqGpFSg
 wpwymYcKQ3BXeJC0aGQH
 =FzOc
 -----END PGP SIGNATURE-----

Merge tag 'asoc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

A small fix for the SSI driver and a fix for system shutdown with modern
devices.  Most of the modern devices will never get shut down normally
with a visible kernel log as the systems they're in tend not to shut
down often and when they do it's usually in form factors that don't have
a user visible console.
2012-03-01 14:17:07 +01:00
Tejun Heo 847854f598 memblock: Fix size aligning of memblock_alloc_base_nid()
memblock allocator aligns @size to @align to reduce the amount
of fragmentation.  Commit:

 7bd0b0f0da ("memblock: Reimplement memblock allocation using reverse free area iterator")

Broke it by incorrectly relocating @size aligning to
memblock_find_in_range_node().  As the aligned size is not
propagated back to memblock_alloc_base_nid(), the actually
reserved size isn't aligned.

While this increases memory use for memblock reserved array,
this shouldn't cause any critical failure; however, it seems
that the size aligning was hiding a use-beyond-allocation bug in
sparc64 and losing the aligning causes boot failure.

The underlying problem is currently being debugged but this is a
proper fix in itself, it's already pretty late in -rc cycle for
boot failures and reverting the change for debugging isn't
difficult. Restore the size aligning moving it to
memblock_alloc_base_nid().

Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20120228205621.GC3252@dhcp-172-17-108-109.mtv.corp.google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <alpine.SOC.1.00.1202130942030.1488@math.ut.ee>
2012-03-01 10:53:18 +01:00