]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
13 years agoperf events: initialize fd array to -1 instead of 0
David Ahern [Fri, 27 May 2011 15:58:34 +0000 (09:58 -0600)]
perf events: initialize fd array to -1 instead of 0

perf_evsel__alloc_fd allocates an array of file descriptors with the
memory initialized to 0. The array has dimensions for cpus and threads.

Later, __perf_evsel__open calls sys_perf_event_open for each cpu and thread
dimensions. If the open fails for any of the cpus or threads then the fd's
for this event are closed and the fd entry in the array is set to -1. Now,
if the first attempt fails for the event (e.g., the event is not supported)
the remaining dimensions (cpu > 0 and thread > 0) are not touched and left
at the initialized value of 0.

builtin-stat catches ENOENT and ENOSYS failures and allows the command to
continue. The end result is that stat attempts to read from an fd of 0 which
of course is stdin and so the command hangs until you type ctrl-D.

Resolve by initializing the array to -1 since an fd < 0 is already
handled.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1306511914-8016-1-git-send-email-dsahern@gmail.com
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoperf tools: Make sure kptr_restrict warnings fit 80 col terms
Arnaldo Carvalho de Melo [Fri, 27 May 2011 14:00:41 +0000 (11:00 -0300)]
perf tools: Make sure kptr_restrict warnings fit 80 col terms

Suggested-by: Ingo Molnar <mingo@elte.hu>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Link: http://lkml.kernel.org/n/tip-i1p8vrhq7xveyui6t1sc914e@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 27 May 2011 18:16:27 +0000 (11:16 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  net: Kill ratelimit.h dependency in linux/net.h
  net: Add linux/sysctl.h includes where needed.
  net: Kill ether_table[] declaration.
  inetpeer: fix race in unused_list manipulations
  atm: expose ATM device index in sysfs
  IPVS: bug in ip_vs_ftp, same list heaad used in all netns.
  bug.h: Move ratelimit warn interfaces to ratelimit.h
  bonding: cleanup module option descriptions
  net:8021q:vlan.c Fix pr_info to just give the vlan fullname and version.
  net: davinci_emac: fix dev_err use at probe
  can: convert to %pK for kptr_restrict support
  net: fix ETHTOOL_SFEATURES compatibility with old ethtool_ops.set_flags
  netfilter: Fix several warnings in compat_mtw_from_user().
  netfilter: ipset: fix ip_set_flush return code
  netfilter: ipset: remove unused variable from type_pf_tdel()
  netfilter: ipset: Use proper timeout value to jiffies conversion

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs...
Linus Torvalds [Fri, 27 May 2011 18:07:50 +0000 (11:07 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
  MAINTAINERS: Update eCryptfs mailing list
  eCryptfs: Allow 2 scatterlist entries for encrypted filenames
  eCryptfs: Clear i_nlink in rmdir

13 years agonet: Kill ratelimit.h dependency in linux/net.h
David S. Miller [Fri, 27 May 2011 17:41:33 +0000 (13:41 -0400)]
net: Kill ratelimit.h dependency in linux/net.h

Ingo Molnar noticed that we have this unnecessary ratelimit.h
dependency in linux/net.h, which hid compilation problems from
people doing builds only with CONFIG_NET enabled.

Move this stuff out to a seperate net/net_ratelimit.h file and
include that in the only two places where this thing is needed.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
13 years agonet: Add linux/sysctl.h includes where needed.
David S. Miller [Thu, 26 May 2011 20:40:37 +0000 (16:40 -0400)]
net: Add linux/sysctl.h includes where needed.

Several networking headers were depending upon the implicit
linux/sysctl.h include they get when including linux/net.h

Add explicit includes.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Kill ether_table[] declaration.
David S. Miller [Thu, 26 May 2011 20:30:57 +0000 (16:30 -0400)]
net: Kill ether_table[] declaration.

This got missed back in 2006 when Jes Sorensen deleted
net/ethernet/sysctl_net_ether.c

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinetpeer: fix race in unused_list manipulations
Eric Dumazet [Thu, 26 May 2011 17:27:11 +0000 (17:27 +0000)]
inetpeer: fix race in unused_list manipulations

Several crashes in cleanup_once() were reported in recent kernels.

Commit d6cc1d642de9 (inetpeer: various changes) added a race in
unlink_from_unused().

One way to avoid taking unused_peers.lock before doing the list_empty()
test is to catch 0->1 refcnt transitions, using full barrier atomic
operations variants (atomic_cmpxchg() and atomic_inc_return()) instead
of previous atomic_inc() and atomic_add_unless() variants.

We then call unlink_from_unused() only for the owner of the 0->1
transition.

Add a new atomic_add_unless_return() static helper

With help from Arun Sharma.

Refs: https://bugzilla.kernel.org/show_bug.cgi?id=32772

Reported-by: Arun Sharma <asharma@fb.com>
Reported-by: Maximilian Engelhardt <maxi@daemonizer.de>
Reported-by: Yann Dupont <Yann.Dupont@univ-nantes.fr>
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap...
Linus Torvalds [Fri, 27 May 2011 17:25:02 +0000 (10:25 -0700)]
Merge branch 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs

* 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs:
  Create Documentation/security/, move LSM-, credentials-, and keys-related files from Documentation/   to Documentation/security/, add Documentation/security/00-INDEX, and update all occurrences of Documentation/<moved_file>   to Documentation/security/<moved_file>.

13 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Fri, 27 May 2011 17:24:40 +0000 (10:24 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  loop: export module parameters
  block: export blk_{get,put}_queue()
  block: remove unused variable in bio_attempt_front_merge()
  block: always allocate genhd->ev if check_events is implemented
  brd: export module parameters
  brd: fix comment on initial device creation
  brd: handle on-demand devices correctly
  brd: limit 'max_part' module param to DISK_MAX_PARTS
  brd: get rid of unused members from struct brd_device
  block: fix oops on !disk->queue and sysfs discard alignment display

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Fri, 27 May 2011 17:23:51 +0000 (10:23 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Fix endian error comparing authusers when cifsacl enabled
  [CIFS] Rename three structures to avoid camel case
  Fix extended security auth failure
  CIFS: Add rwpidforward mount option
  CIFS: Migrate to shared superblock model
  [CIFS] Migrate from prefixpath logic
  CIFS: Fix memory leak in cifs_do_mount
  [CIFS] When mandatory encryption on share, fail mount
  CIFS: Use pid saved from cifsFileInfo in writepages and set_file_size
  cifs: add cifs_async_writev
  cifs: clean up wsize negotiation and allow for larger wsize
  cifs: convert cifs_writepages to use async writes
  CIFS: Fix undefined behavior when mount fails
  cifs: don't call mid_q_entry->callback under the Global_MidLock (try #5)
  CIFS: Simplify mount code for further shared sb capability
  CIFS: Simplify connection structure search calls
  cifs: remove unused SMB2 config and mount options
  cifs: add ignore_pend flag to cifs_call_async
  cifs: make cifs_send_async take a kvec array
  cifs: consolidate SendReceive response checks

13 years agoMerge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
Linus Torvalds [Fri, 27 May 2011 17:23:10 +0000 (10:23 -0700)]
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2

* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
  Ocfs2/move_extents: Validate moving goal after the adjustment.
  Ocfs2/move_extents: Avoid doing division in extent moving.

13 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Fri, 27 May 2011 17:18:00 +0000 (10:18 -0700)]
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] mm: add ZONE_DMA to 31-bit config again
  [S390] mm: add page fault retry handling
  [S390] mm: handle kernel caused page fault oom situations
  [S390] delay: implement ndelay
  [S390] topology,sched: fix cpu_coregroup_mask/cpu_book_mask definitions
  [S390] hwsampler: allow cpu hotplug
  [S390] uaccess: turn __access_ok() into a define
  [S390] irq: merge irq.c and s390_ext.c
  [S390] irq: fix service signal external interrupt handling
  [S390] pfault: always enable service signal interrupt

13 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Fri, 27 May 2011 17:17:30 +0000 (10:17 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/fsl_rio: Error interrupt handler for sRIO on MPC85xx
  powerpc/fsl_rio: move machine_check handler
  powerpc/fsl_lbc: Add workaround for ELBC-A001 erratum

13 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Fri, 27 May 2011 17:14:22 +0000 (10:14 -0700)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] v1.88 DM04/QQBOX Move remote to use rc_core dvb-usb-remote
  [media] Add missing include guard to header file
  [media] Inlined functions should be static
  [media] Remove invalid parameter description
  [media] cpia2: fix warning about invalid trigraph sequence
  [media] s5p-csis: Add missing dependency on PLAT_S5P
  [media] gspca/kinect: wrap gspca_debug with GSPCA_DEBUG
  [media] fintek-cir: new driver for Fintek LPC SuperIO CIR function
  [media] uvcvideo: Connect video devices to media entities
  [media] uvcvideo: Register subdevices for each entity
  [media] uvcvideo: Register a v4l2_device
  [media] add V4L2-PIX-FMT-SRGGB12 & friends to docbook
  [media] Documentation/DocBook: Rename media fops xml files
  [media] Media DocBook: fix validation errors
  [media] wl12xx: g_volatile_ctrl fix: wrong field set
  [media] fix kconfig dependency warning for VIDEO_TIMBERDALE
  [media] dm1105: GPIO handling added, I2C on GPIO added, LNB control through GPIO reworked
  [media] Add support for M-5MOLS 8 Mega Pixel camera ISP

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
Linus Torvalds [Fri, 27 May 2011 17:13:01 +0000 (10:13 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (42 commits)
  regulator: Fix _regulator_get_voltage if get_voltage callback is NULL
  USB: TWL6025 allow different regulator name
  REGULATOR: TWL6025: add support to twl-regulator
  regulator: twl6030: do not write to _GRP for regulator disable
  regulator: twl6030: do not write to _GRP for regulator enable
  TPS65911: Comparator: Add comparator driver
  TPS65911: Add support for added GPIO lines
  GPIO: TPS65910: Move driver to drivers/gpio/
  TPS65911: Add new irq definitions
  regulator: tps65911: Add new chip version
  MFD: TPS65910: Add support for TPS65911 device
  regulator: Fix off-by-one value range checking for mc13xxx_regulator_get_voltage
  regulator: mc13892: Fix voltage unit in test case.
  regulator: Remove MAX8997_REG_BUCK1DVS/MAX8997_REG_BUCK2DVS/MAX8997_REG_BUCK5DVS macros
  mfd: Fix off-by-one value range checking for tps65910_i2c_write
  regulator: Only apply voltage constraints from consumers that set them
  regulator: If we can't configure optimum mode we're always in the best one
  regulator: max8997: remove useless code
  regulator: Fix memory leak in max8998_pmic_probe failure path
  regulator: Fix desc_id for tps65023/6507x/65910
  ...

13 years agoMerge git://git.infradead.org/battery-2.6
Linus Torvalds [Fri, 27 May 2011 17:12:35 +0000 (10:12 -0700)]
Merge git://git.infradead.org/battery-2.6

* git://git.infradead.org/battery-2.6:
  PXA: Use dev_pm_ops in z2_battery
  ds2760_battery: Fix rated capacity of the hx4700 1800mAh battery
  ds2760_battery: Fix indexing of the 4 active full EEPROM registers
  power: Make test_power driver more dynamic.
  bq27x00_battery: Name of cycle count property
  max8903_charger: Add GENERIC_HARDIRQS as a dependency (fixes S390 build)
  ARM: RX-51: Enable isp1704 power on/off
  isp1704_charger: Allow board specific powering routine
  gpio-charger: Add gpio_charger_resume
  power_supply: Add driver for MAX8903 charger

13 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Fri, 27 May 2011 17:11:42 +0000 (10:11 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
  hwmon: (coretemp) Fix section mismatch
  hwmon: (pmbus) Initialize sysfs attributes
  hwmon: (coretemp) Update comments describing the handling of HT CPUs
  hwmon: (coretemp) Initialize sysfs attributes

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 27 May 2011 17:10:51 +0000 (10:10 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (26 commits)
  ASoC: Fix power down for widgetless per-card DAPM context case
  ASoC: wm1250-ev1: Define "WM1250 Output" with SND_SOC_DAPM_OUTPUT
  ASoC: Remove duplicate linux/delay.h inclusion.
  ASoC: sam9g20_wm8731: use the proper SYSCKL value
  ASoC: wm8731: fix wm8731_check_osc() connected condition
  ALSA: hda - Reorganize controller quriks with bit flags
  ALSA: hda - Use snd_printd() in snd_hda_parse_pin_def_config()
  ALSA: core: remove unused variables.
  ALSA: HDA: Increase MAX_HDMI_PINS
  ALSA: PCM - Don't check DMA time-out too shortly
  MAINTAINERS: add FireWire audio maintainer
  ALSA: usb-audio: more control quirks for M-Audio FastTrack devices
  ALSA: usb-audio: add new quirk type QUIRK_AUDIO_STANDARD_MIXER
  ALSA: usb-audio: export snd_usb_feature_unit_ctl
  ALSA: usb-audio: rework add_control_to_empty()
  ALSA: usb-audio: move assignment of chip->ctrl_intf
  ALSA: hda - Use model=auto for Lenovo G555
  ALSA: HDA: Unify HDMI hotplug handling.
  ALSA: hda - Force AD1988_6STACK_DIG for Asus M3N-HT Deluxe
  ASoC: core - remove superfluous new line.
  ...

13 years agoatm: expose ATM device index in sysfs
Dan Williams [Fri, 27 May 2011 04:51:54 +0000 (04:51 +0000)]
atm: expose ATM device index in sysfs

It's currently exposed only through /proc which, besides requiring
screen-scraping, doesn't allow userspace to distinguish between two
identical ATM adapters with different ATM indexes.  The ATM device index
is required when using PPPoATM on a system with multiple ATM adapters.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: David Woodhouse <dwmw2@infradead.org>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'pablo/nf-2.6-updates' of git://1984.lsi.us.es/net-2.6
David S. Miller [Fri, 27 May 2011 17:04:40 +0000 (13:04 -0400)]
Merge branch 'pablo/nf-2.6-updates' of git://1984.lsi.us.es/net-2.6

13 years agoMAINTAINERS: Update eCryptfs mailing list
Tyler Hicks [Fri, 27 May 2011 16:47:59 +0000 (11:47 -0500)]
MAINTAINERS: Update eCryptfs mailing list

The eCryptfs mailing list has moved from lists.launchpad.net to
vger.kernel.org.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
13 years agoeCryptfs: Allow 2 scatterlist entries for encrypted filenames
Tyler Hicks [Tue, 17 May 2011 05:50:33 +0000 (00:50 -0500)]
eCryptfs: Allow 2 scatterlist entries for encrypted filenames

The buffers allocated while encrypting and decrypting long filenames can
sometimes straddle two pages. In this situation, virt_to_scatterlist()
will return -ENOMEM, causing the operation to fail and the user will get
scary error messages in their logs:

kernel: ecryptfs_write_tag_70_packet: Internal error whilst attempting
to convert filename memory to scatterlist; expected rc = 1; got rc =
[-12]. block_aligned_filename_size = [272]
kernel: ecryptfs_encrypt_filename: Error attempting to generate tag 70
packet; rc = [-12]
kernel: ecryptfs_encrypt_and_encode_filename: Error attempting to
encrypt filename; rc = [-12]
kernel: ecryptfs_lookup: Error attempting to encrypt and encode
filename; rc = [-12]

The solution is to allow up to 2 scatterlist entries to be used.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Cc: <stable@kernel.org>
13 years agoeCryptfs: Clear i_nlink in rmdir
Tyler Hicks [Fri, 29 Apr 2011 21:26:27 +0000 (16:26 -0500)]
eCryptfs: Clear i_nlink in rmdir

eCryptfs wasn't clearing the eCryptfs inode's i_nlink after a successful
vfs_rmdir() on the lower directory. This resulted in the inode evict and
destroy paths to be missed.

https://bugs.launchpad.net/ecryptfs/+bug/723518

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Cc: <stable@kernel.org>
13 years agoacer-wmi: support integer return type from WMI methods
Lee, Chun-Yi [Fri, 27 May 2011 06:52:14 +0000 (14:52 +0800)]
acer-wmi: support integer return type from WMI methods

Acer WMID_GUID1/2 method's return value was declared to integer
type on Gateway notebook.
So, add this patch for support integer return type.

Reference: bko#33032
https://bugzilla.kernel.org/show_bug.cgi?id=33032

Tested on Gateway NV5909H laptop

Tested-by: Filipus Klutiero <chealer@gmail.com>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agomsi-laptop: fix section mismatch in reference from the function load_scm_model_init
Lee, Chun-Yi [Thu, 26 May 2011 03:09:19 +0000 (11:09 +0800)]
msi-laptop: fix section mismatch in reference from the function load_scm_model_init

There have section mismatch warning message shows up when building
the kernel with make CONFIG_DEBUG_SECTION_MISMATCH=y.

The problem is the load_scm_model_init() calls msi_laptop_input_setup()
which is an __init function, but load_scm_model_init() lacks a __init
annotation.

This patch add __init on load_scm_model_init() to avoid warning message.

Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: support to set communication device state by new wmid method
Lee, Chun-Yi [Sat, 21 May 2011 23:33:54 +0000 (07:33 +0800)]
acer-wmi: support to set communication device state by new wmid method

Have many Acer notebooks' BIOS already support new WMID_GUID3 method.
On those machines, that will be better set communication device by
evaluate WMID_GUID3 method.

Tested on Acer Travelmate 8572

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: allow 64-bits return buffer from WMI methods
Lee, Chun-Yi [Sat, 21 May 2011 23:33:53 +0000 (07:33 +0800)]
acer-wmi: allow 64-bits return buffer from WMI methods

Acer WMID_GUID1/2 method's return buffer was declared to 64-bits
on some Acer notebook, but WMI method only use 32-bits in return
buffer.
So, add this patch for allow 64-bits return buffer.

Reference: bko#34142
https://bugzilla.kernel.org/show_bug.cgi?id=34142

Tested on Acer Travelmate 5735Z-452G32Mnss

Tested-by: Melchior FRANZ <melchior.franz@gmail.com>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: check the existence of internal 3G device when set capability
Lee, Chun-Yi [Sat, 21 May 2011 23:33:52 +0000 (07:33 +0800)]
acer-wmi: check the existence of internal 3G device when set capability

That will be better to check the existence of internal 3G device when
we set threeg capability and generate killswitch for threeg. It can
avoid userland access 3G rfkill but the machine doesn't have internal
3G device.

Reference: bko#32862
https://bugzilla.kernel.org/show_bug.cgi?id=32862

Tested on Acer Aspire 8930G, Acer Travelmate 8572

Tested-by: Hector Martin <hector@marcansoft.com>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform/x86:delete two unused variables
Weiping Pan [Mon, 16 May 2011 06:49:47 +0000 (14:49 +0800)]
platform/x86:delete two unused variables

variable handle is not used in these two functions,
just delete them.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agosupport wlan hotkey on Acer Travelmate 5735Z
Melchior FRANZ [Tue, 24 May 2011 08:35:55 +0000 (10:35 +0200)]
support wlan hotkey on Acer Travelmate 5735Z

On an Acer Travelmate 5735Z-452G32Mnss the WLAN-enable/disable key
doesn't send 0x1 as acpi event key code, but 0x3. This patch also
makes the module ignore hotkey acpi events for functions that are
already handled without. This avoids warning message "keyboard:
can't emulate rawmode for keycode 240".

Signed-off-by: Melchior FRANZ <mfranz@aon.at>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform-x86: intel_mid_thermal: Fix memory leak
Ameya Palande [Thu, 7 Apr 2011 13:30:02 +0000 (16:30 +0300)]
platform-x86: intel_mid_thermal: Fix memory leak

Signed-off-by: Ameya Palande <2ameya@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform/x86: Fix Makefile for intel_mid_powerbtn
Ameya Palande [Wed, 6 Apr 2011 14:45:03 +0000 (17:45 +0300)]
platform/x86: Fix Makefile for intel_mid_powerbtn

Signed-off-by: Ameya Palande <2ameya@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform/x86: Simplify intel_mid_powerbtn
Ameya Palande [Wed, 6 Apr 2011 14:44:37 +0000 (17:44 +0300)]
platform/x86: Simplify intel_mid_powerbtn

This patch:
1. Removes unnecessay #defines
2. Removes 'mfld_pb_priv' data structure which results in simpler error
   handling and less memory allocations.

Signed-off-by: Ameya Palande <2ameya@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: Delete out-of-date documentation
Carlos Corbacho [Mon, 2 May 2011 08:57:23 +0000 (09:57 +0100)]
acer-wmi: Delete out-of-date documentation

The documentation file for acer-wmi is long out of date, and there's not
much point in keeping it around either.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacerhdf: Clean up includes
Jean Delvare [Sun, 24 Apr 2011 16:07:55 +0000 (18:07 +0200)]
acerhdf: Clean up includes

* The acerhdf driver isn't an ACPI driver, so it needs not include
  <acpi/acpi_drivers.h>. All it uses is ec_read() and ec_write(), for
  which <linux/acpi.h> is sufficient.
* I couldn't find any reason why <linux/fs.h> and <linux/sched.h> were
  included.

This should avoid unneeded rebuilds of the acerhdf driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Peter Feuerer <peter@piie.net>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacerhdf: Drop pointless dependency on THERMAL_HWMON
Jean Delvare [Sun, 24 Apr 2011 09:00:08 +0000 (11:00 +0200)]
acerhdf: Drop pointless dependency on THERMAL_HWMON

The THERMAL_HWMON config option simply exposes the thermal zone
temperature values and limits to user-space. It makes no sense for a
kernel driver to depend on this.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Peter Feuerer <peter@piie.net>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: Update MAINTAINERS
Carlos Corbacho [Mon, 2 May 2011 08:57:18 +0000 (09:57 +0100)]
acer-wmi: Update MAINTAINERS

I don't have the time or much interest these days in maintaining acer-wmi, as I
don't have access to newer Acer hardware. As he's been doing most of the work
these days anyway, Joey Lee has kindly agreed to take over.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Joey Lee <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agowmi: Orphan ACPI-WMI driver
Carlos Corbacho [Mon, 2 May 2011 08:57:13 +0000 (09:57 +0100)]
wmi: Orphan ACPI-WMI driver

I no longer have the time to work on this, and haven't really been doing any
work to this either. Time to let someone else take the reins.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agotc1100-wmi: Orphan driver
Carlos Corbacho [Mon, 2 May 2011 08:57:08 +0000 (09:57 +0100)]
tc1100-wmi: Orphan driver

I've never owned the hardware, this was a port of an existing driver to prove
that the ACPI-WMI code was useful to more than just acer-wmi.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: does not allow negative number set to initial device state
Lee, Chun-Yi [Fri, 15 Apr 2011 10:42:47 +0000 (18:42 +0800)]
acer-wmi: does not allow negative number set to initial device state

The driver set module parameter value: mailled, threeg and brightness
to BIOS by evaluate wmi method when driver was initialed. The default
values for those parameters are -1, so, that will be better don't set
negative value to BIOS.

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform/oaktrail: ACPI EC Extra driver for Oaktrail
Yin Kangkai [Wed, 6 Apr 2011 14:05:24 +0000 (15:05 +0100)]
platform/oaktrail: ACPI EC Extra driver for Oaktrail

This driver implements an Extra ACPI EC driver for products based on Intel
Oaktrail platform.

This driver does below things:
1. registers itself in the Linux backlight control in
   /sys/class/backlight/intel_oaktrail/

2. registers in the rfkill subsystem here: /sys/class/rfkill/rfkillX/
   for these components: wifi, bluetooth, wwan (3g), gps

Signed-off-by: Yin Kangkai <kangkai.yin@linux.intel.com>
[Extracted from a bigger patch by Yin Kangkai, this version leaves out some
 sysfs bits that probably want to be driver managed, and ACPI i2c enumeration]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agothinkpad_acpi: Convert printks to pr_<level>
Joe Perches [Mon, 4 Apr 2011 17:06:25 +0000 (10:06 -0700)]
thinkpad_acpi: Convert printks to pr_<level>

Add pr_fmt.
Removed local TPACPI_<level> #defines, convert to pr_<level>.
Neaten dbg_<foo> macros.
Added a few missing newlines to logging messages.
Added static inline str_supported for !CONFIG_THINKPAD_ACPI_DEBUG vdbg_printk
defect reported by Sedat Dilek <sedat.dilek@googlemail.com>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agothinkpad_acpi: Correct !CONFIG_THINKPAD_ACPI_VIDEO warning
Joe Perches [Mon, 4 Apr 2011 17:06:24 +0000 (10:06 -0700)]
thinkpad_acpi: Correct !CONFIG_THINKPAD_ACPI_VIDEO warning

Move TPACPI_HANDLE declaration into #ifdef block
and neaten it a bit.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform-x86: intel_mid_thermal: Fix coding style
Ameya Palande [Fri, 1 Apr 2011 13:54:11 +0000 (16:54 +0300)]
platform-x86: intel_mid_thermal: Fix coding style

Before fixing checkpatch.pl reported 74 errors and 234 warnings

Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoxo15-ebook: Use pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:54 +0000 (15:21 -0700)]
xo15-ebook: Use pr_<level>

Use the current logging styles.

Remove local #define PREFIX.
Add pr_fmt.
Convert printk to pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agowmi: Removed trailing whitespace from logging message.
Joe Perches [Tue, 29 Mar 2011 22:21:53 +0000 (15:21 -0700)]
wmi: Removed trailing whitespace from logging message.

Just neatening.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agotoshiba: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:52 +0000 (15:21 -0700)]
toshiba: Convert printks to pr_<level>

Add pr_fmt.
Remove local MY_<foo> #defines.
Convert printks to pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agotopstar-laptop: Convert remaining printk to pr_info
Joe Perches [Tue, 29 Mar 2011 22:21:51 +0000 (15:21 -0700)]
topstar-laptop: Convert remaining printk to pr_info

To be similar to all other uses.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agotc1100-wmi: Add pr_fmt, use pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:49 +0000 (15:21 -0700)]
tc1100-wmi: Add pr_fmt, use pr_<level>

Use the more normal logging styles.
Removed now unused local logging #defines.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agosony-laptop: Add and use #define pr_fmt
Joe Perches [Tue, 29 Mar 2011 22:21:48 +0000 (15:21 -0700)]
sony-laptop: Add and use #define pr_fmt

Add pr_fmt.
Remove now unused #define DRV_PRX.
Neaten dprintk macro.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agomsi-wmi: Use pr_fmt and pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:47 +0000 (15:21 -0700)]
msi-wmi: Use pr_fmt and pr_<level>

Added pr_fmt.
Removed now unused #define DRV_PFX
Convert dprintk to pr_debug.
Convert printks to pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agomsi-laptop: pr_<level> neatening
Joe Perches [Tue, 29 Mar 2011 22:21:46 +0000 (15:21 -0700)]
msi-laptop: pr_<level> neatening

Just making it a bit more like other logging message uses.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agointel_pmic_gpio: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:45 +0000 (15:21 -0700)]
intel_pmic_gpio: Convert printks to pr_<level>

Add #define pr_fmt(fmt) "%s: " fmt, __func__
to prefix function name to each output message.
Convert printks to pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agointel_menlow: Add pr_fmt and use pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:44 +0000 (15:21 -0700)]
intel_menlow: Add pr_fmt and use pr_<level>

Add pr_fmt to prefix the logging messages.
Convert printk to pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoideapad-laptop: Add pr_fmt
Joe Perches [Tue, 29 Mar 2011 22:21:43 +0000 (15:21 -0700)]
ideapad-laptop: Add pr_fmt

Add pr_fmt to prefix logging messages.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoibm_rtl: Use pr_fmt and pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:42 +0000 (15:21 -0700)]
ibm_rtl: Use pr_fmt and pr_<level>

Remove hard coded prefixes from logging messages.
Neaten RTL_DEBUG macro and uses.
Convert __FUNCTION__ to __func__.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agohp-wmi: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:41 +0000 (15:21 -0700)]
hp-wmi: Convert printks to pr_<level>

Added pr_fmt and converted printks to pr_<level>.
Removed now unused PREFIX and UNIMPL #defines.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agohdaps: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:40 +0000 (15:21 -0700)]
hdaps: Convert printks to pr_<level>

Added pr_fmt, converted printks and removed
hard coded prefixes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agofujitsu-laptop: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:39 +0000 (15:21 -0700)]
fujitsu-laptop: Convert printks to pr_<level>

Added pr_fmt, converted printks and removed
hard coded prefixes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoeeepc: Use pr_warn
Joe Perches [Tue, 29 Mar 2011 22:21:38 +0000 (15:21 -0700)]
eeepc: Use pr_warn

Just a trivial pr_warning to pr_warn conversion
while adding a few missing newlines.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agodell: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:37 +0000 (15:21 -0700)]
dell: Convert printks to pr_<level>

Add pr_fmt.
Remove hard coded prefixes and use pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agocompal-laptop: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:36 +0000 (15:21 -0700)]
compal-laptop: Convert printks to pr_<level>

Add pr_fmt.
Convert printks to pr_<level> removing DRIVER_NAME prefix.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus: Add pr_fmt and convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:35 +0000 (15:21 -0700)]
asus: Add pr_fmt and convert printks to pr_<level>

Add pr_fmt, prefixes each log message.
Convert printks to pr_<level>.
Convert pr_warning to pr_warn.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: pr_<level> cleanups
Joe Perches [Tue, 29 Mar 2011 22:21:34 +0000 (15:21 -0700)]
acer-wmi: pr_<level> cleanups

Convert pr_warning to pr_warn.
Add some missing newlines to pr_<level> uses.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoibm_rtl: Remove warnings from casts of pointer to int
Joe Perches [Tue, 29 Mar 2011 22:21:33 +0000 (15:21 -0700)]
ibm_rtl: Remove warnings from casts of pointer to int

Just print them as %p.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: Remove __init from asus_wmi_platform_init
Joe Perches [Tue, 29 Mar 2011 22:21:32 +0000 (15:21 -0700)]
asus-wmi: Remove __init from asus_wmi_platform_init

It's used by a non-init function.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoGPIO: OMAP: move to drivers/gpio
Kevin Hilman [Fri, 20 May 2011 09:53:37 +0000 (11:53 +0200)]
GPIO: OMAP: move to drivers/gpio

Move OMAP GPIO driver to drivers/gpio.  Builds whenever
CONFIG_ARCH_OMAP=y.

Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoGPIO: OMAP: move register offset defines into <plat/gpio.h>
Kevin Hilman [Wed, 20 Apr 2011 22:44:11 +0000 (15:44 -0700)]
GPIO: OMAP: move register offset defines into <plat/gpio.h>

Register offset defines are moved to <plat/gpio.h> so they can be used
by SoC-specific device init code to fill out platform_data register
offsets.

Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years ago[CIFS] Fix endian error comparing authusers when cifsacl enabled
Steve French [Fri, 27 May 2011 15:19:12 +0000 (15:19 +0000)]
[CIFS] Fix endian error comparing authusers when cifsacl enabled

Fix sparse warning:
 CHECK   fs/cifs/cifsacl.c
fs/cifs/cifsacl.c:41:36: warning: incorrect type in initializer
(different base types)
fs/cifs/cifsacl.c:41:36:    expected restricted __le32
fs/cifs/cifsacl.c:41:36:    got int
fs/cifs/cifsacl.c:461:52: warning: restricted __le32 degrades to integer
fs/cifs/cifsacl.c:461:73: warning: restricted __le32 degrades to integer

The second one looks harmless but the first one (sid_authusers)
was added in commit 2fbc2f1729e785a7b2faf9d8d60926bb1ff62af0
and only affects 2.6.38/2.6.39

CC: Stable <stable@kernel.org>
Reviewed-and-Tested-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agoarch/tile: more /proc and /sys file support
Chris Metcalf [Thu, 26 May 2011 16:40:09 +0000 (12:40 -0400)]
arch/tile: more /proc and /sys file support

This change introduces a few of the less controversial /proc and
/proc/sys interfaces for tile, along with sysfs attributes for
various things that were originally proposed as /proc/tile files.
It also adjusts the "hardwall" proc API.

Arnd Bergmann reviewed the initial arch/tile submission, which
included a complete set of all the /proc/tile and /proc/sys/tile
knobs that we had added in a somewhat ad hoc way during initial
development, and provided feedback on where most of them should go.

One knob turned out to be similar enough to the existing
/proc/sys/debug/exception-trace that it was re-implemented to use
that model instead.

Another knob was /proc/tile/grid, which reported the "grid" dimensions
of a tile chip (e.g. 8x8 processors = 64-core chip).  Arnd suggested
looking at sysfs for that, so this change moves that information
to a pair of sysfs attributes (chip_width and chip_height) in the
/sys/devices/system/cpu directory.  We also put the "chip_serial"
and "chip_revision" information from our old /proc/tile/board file
as attributes in /sys/devices/system/cpu.

Other information collected via hypervisor APIs is now placed in
/sys/hypervisor.  We create a /sys/hypervisor/type file (holding the
constant string "tilera") to be parallel with the Xen use of
/sys/hypervisor/type holding "xen".  We create three top-level files,
"version" (the hypervisor's own version), "config_version" (the
version of the configuration file), and "hvconfig" (the contents of
the configuration file).  The remaining information from our old
/proc/tile/board and /proc/tile/switch files becomes an attribute
group appearing under /sys/hypervisor/board/.

Finally, after some feedback from Arnd Bergmann for the previous
version of this patch, the /proc/tile/hardwall file is split up into
two conceptual parts.  First, a directory /proc/tile/hardwall/ which
contains one file per active hardwall, each file named after the
hardwall's ID and holding a cpulist that says which cpus are enclosed by
the hardwall.  Second, a /proc/PID file "hardwall" that is either
empty (for non-hardwall-using processes) or contains the hardwall ID.

Finally, this change pushes the /proc/sys/tile/unaligned_fixup/
directory, with knobs controlling the kernel code for handling the
fixup of unaligned exceptions.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
13 years agoASoC: Fix wm_hubs input PGA ZC bits
Mark Brown [Fri, 27 May 2011 13:56:16 +0000 (21:56 +0800)]
ASoC: Fix wm_hubs input PGA ZC bits

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoBtrfs: use the device_list_mutex during write_dev_supers
Chris Mason [Fri, 27 May 2011 14:03:58 +0000 (10:03 -0400)]
Btrfs: use the device_list_mutex during write_dev_supers

write_dev_supers was changed to use RCU to protect the list of
devices, but it was then sleeping while it actually wrote the supers.
This fixes it to just use the mutex, since we really don't any
concurrency in write_dev_supers anyway.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoASoC: Fix dapm_is_shared_kcontrol so everything isn't shared
Stephen Warren [Thu, 26 May 2011 15:57:33 +0000 (09:57 -0600)]
ASoC: Fix dapm_is_shared_kcontrol so everything isn't shared

Commit af46800 ("ASoC: Implement mux control sharing") introduced
function dapm_is_shared_kcontrol.

When this function returns true, the naming of DAPM controls is derived
from the kcontrol_new. Otherwise, the name comes from the widget (and
possibly a widget's naming prefix).

A bug in the implementation of dapm_is_shared_kcontrol made it return 1
in all cases. Hence, that commit caused a change in control naming for
all controls instead of just shared controls.

Specifically, a control is always considered shared because it is always
compared against itself. Solve this by never comparing against the widget
containing the control being created.

Equally, controls should never be shared between DAPM contexts; when the
same codec is instantiated multiple times, the same kcontrol_new will be
used. However, the control should no be shared between the multiple
instances.

I tested that with the Tegra WM8903 driver:
* Shared is now mostly 0 as expected, and sometimes 1.
* The expected controls are still generated after this change.

However, I don't have any systems that have a widget/control naming
prefix, so I can't test that aspect.

Thanks for Jarkko Nikula for pointing out how to fix this.

Reported-by: Liam Girdwood <lrg@ti.com>
Tested-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agofs: cosmetic inode.c cleanups
Christoph Hellwig [Fri, 27 May 2011 13:28:01 +0000 (09:28 -0400)]
fs: cosmetic inode.c cleanups

Move the lock order description after all the includes, remove several
fairly outdated and/or incorrect comments, move Andrea's
copyright/changelog to the top where it belongs, remove the pointless
filename in the top of the file comment, and remove to useless macros.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agovfs: Improve the bio_add_page() and bio_add_pc_page() descriptions
Andreas Gruenbacher [Fri, 27 May 2011 12:52:09 +0000 (14:52 +0200)]
vfs: Improve the bio_add_page() and bio_add_pc_page() descriptions

The descriptions of bio_add_page() and bio_add_pc_page() are slightly
inconsistent; improve them.

Signed-off-by: Andreas Gruenbacher <agruen@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoxattr: Fix error results for non-existent / invisible attributes
Andreas Gruenbacher [Fri, 27 May 2011 12:50:36 +0000 (14:50 +0200)]
xattr: Fix error results for non-existent / invisible attributes

Return -ENODATA when trying to read a user.* attribute which cannot
exist: user space otherwise does not have a reasonable way to
distinguish between non-existent and inaccessible attributes.

Likewise, return -ENODATA when an unprivileged process tries to read a
trusted.* attribute: to unprivileged processes, those attributes are
invisible (listxattr() won't include them).

Related to this bug report: https://bugzilla.redhat.com/660613

Signed-off-by: Andreas Gruenbacher <agruen@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoMerge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/roste...
Ingo Molnar [Fri, 27 May 2011 12:28:09 +0000 (14:28 +0200)]
Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent

13 years agoMerge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile...
Ingo Molnar [Fri, 27 May 2011 12:08:09 +0000 (14:08 +0200)]
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/urgent

13 years agoIPVS: bug in ip_vs_ftp, same list heaad used in all netns.
Hans Schillstrom [Tue, 24 May 2011 12:11:05 +0000 (14:11 +0200)]
IPVS: bug in ip_vs_ftp, same list heaad used in all netns.

When ip_vs was adapted to netns the ftp application was not adapted
in a correct way.
However this is a fix to avoid kernel errors. In the long term another solution
might be chosen.  I.e the ports that the ftp appl, uses should be per netns.

Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
13 years agofs: pass exact type of data dirties to ->dirty_inode
Christoph Hellwig [Fri, 27 May 2011 10:53:02 +0000 (06:53 -0400)]
fs: pass exact type of data dirties to ->dirty_inode

Tell the filesystem if we just updated timestamp (I_DIRTY_SYNC) or
anything else, so that the filesystem can track internally if it
needs to push out a transaction for fdatasync or not.

This is just the prototype change with no user for it yet.  I plan
to push large XFS changes for the next merge window, and getting
this trivial infrastructure in this window would help a lot to avoid
tree interdependencies.

Also remove incorrect comments that ->dirty_inode can't block.  That
has been changed a long time ago, and many implementations rely on it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoLift the check for automount points into do_lookup()
Al Viro [Fri, 27 May 2011 11:03:15 +0000 (07:03 -0400)]
Lift the check for automount points into do_lookup()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoTrim excessive arguments of follow_mount_rcu()
Al Viro [Fri, 27 May 2011 10:53:39 +0000 (06:53 -0400)]
Trim excessive arguments of follow_mount_rcu()

... and kill a useless local variable in follow_dotdot_rcu(), while
we are at it - follow_mount_rcu(nd, path, inode) *always* assigned
value to *inode, and always it had been path->dentry->d_inode (aka
nd->path.dentry->d_inode, since it always got &nd->path as the second
argument).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agosplit __follow_mount_rcu() into normal and .. cases
Al Viro [Fri, 27 May 2011 10:50:06 +0000 (06:50 -0400)]
split __follow_mount_rcu() into normal and .. cases

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoregulator: Fix _regulator_get_voltage if get_voltage callback is NULL
Axel Lin [Mon, 23 May 2011 12:08:10 +0000 (20:08 +0800)]
regulator: Fix _regulator_get_voltage if get_voltage callback is NULL

In the case of get_voltage callback is NULL, current implementation in
_regulator_get_voltage will return -EINVAL.

Also returns proper error if ret is negative value.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoUSB: TWL6025 allow different regulator name
Graeme Gregory [Sun, 22 May 2011 20:21:24 +0000 (21:21 +0100)]
USB: TWL6025 allow different regulator name

The twl6025 uses a different regulator for USB than the 6030 so select
the correct regulator name depending on the subclass of device.

Since V1

Use features passed via platform data instead of global variable.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoREGULATOR: TWL6025: add support to twl-regulator
Graeme Gregory [Sun, 22 May 2011 20:21:23 +0000 (21:21 +0100)]
REGULATOR: TWL6025: add support to twl-regulator

Adding support for the twl6025. Major difference in the twl6025 is the
group functionality has been removed from the chip so this affects how
regulators are enabled and disabled.

The names of the regulators also changed.

The DCDCs of the 6025 are software controllable as well.

Since V1

Use the features variable passed via platform data instead of calling
global function.

Change the very switch like if statements to be a more readable
switch statement.

Since V2

twl6025 doesn't use remap so remove it from the macros.

Since V3

enable/disable functions for 4030/6030 were seperated upstream so rebase
on top of this. Change DCDC reference to SMPS as this is used in TRM.
Change list_voltage slightly to have less code.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoregulator: twl6030: do not write to _GRP for regulator disable
Balaji T K [Fri, 20 May 2011 13:33:52 +0000 (19:03 +0530)]
regulator: twl6030: do not write to _GRP for regulator disable

TWL6030: regulator is disabled via VREG_STATE
TWL4030: regulator is disabled via VREG_GRP
Since there is nothing common, split twlreg_enable similar to other regulator_ops

Signed-off-by: Balaji T K <balajitk@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoregulator: twl6030: do not write to _GRP for regulator enable
Balaji T K [Fri, 20 May 2011 13:33:51 +0000 (19:03 +0530)]
regulator: twl6030: do not write to _GRP for regulator enable

TWL6030: regulator is enabled via VREG_STATE
TWL4030: regulator is enabled via VREG_GRP
Since there is nothing common, split twlreg_enable similar to other regulator_ops

Signed-off-by: Balaji T K <balajitk@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoTPS65911: Comparator: Add comparator driver
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:35:48 +0000 (18:35 -0500)]
TPS65911: Comparator: Add comparator driver

This driver adds functionality to the tps65911 chip driver.

Two of the comparators are configurable by software and measures
VCCS voltage to detect high or low voltage scenarios.

Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoTPS65911: Add support for added GPIO lines
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:35:42 +0000 (18:35 -0500)]
TPS65911: Add support for added GPIO lines

GPIO 1 to 8 are added for TPS65911 chip version. The gpio driver
now handles more than one gpio lines. Subsequent versions of the
chip family can add new GPIO lines with minimal driver changes.

Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoGPIO: TPS65910: Move driver to drivers/gpio/
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:35:37 +0000 (18:35 -0500)]
GPIO: TPS65910: Move driver to drivers/gpio/

The GPIO driver should reside in drivers/gpio/ for better
organization.

Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoTPS65911: Add new irq definitions
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:35:07 +0000 (18:35 -0500)]
TPS65911: Add new irq definitions

TPS65911 adds new interrupt sources, as well as two new registers
to handle them, one for interrupt status and one for interrupt
masking. The added irqs are:

-VMBCH2 - Low and High threshold
-GPIO1-8 - Rising and falling edge detection
-WTCHDG - Watchdog interrupt
-PWRDN - PWRDN reset interrupt

The code should handle these new registers only when the chip
version is TPS65911.

Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoregulator: tps65911: Add new chip version
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:35:03 +0000 (18:35 -0500)]
regulator: tps65911: Add new chip version

The tps65911 chip introduces new features, including changes in
the regulator module.

- VDD1 and VDD2 remain unchanged.
- VDD3 is now named VDDCTRL and has a wider voltage range.
- LDOs are now named LDO1...8 and voltage ranges are sequential,
  making LDOs easier to handle.

Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoMFD: TPS65910: Add support for TPS65911 device
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:34:59 +0000 (18:34 -0500)]
MFD: TPS65910: Add support for TPS65911 device

The TPS65911 is the next generation of the TPS65910 family of
PMIC chips. It adds a few features:

- Watchdog Timer
- PWM & LED generators
- Comparators for system control status

It also adds a set of Interrupts and GPIOs, among other things.

The driver exports a function to identify between different
versions of the tps65910 family, allowing other modules to
identify the capabilities of the current chip.

Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoregulator: Fix off-by-one value range checking for mc13xxx_regulator_get_voltage
Axel Lin [Wed, 18 May 2011 12:56:45 +0000 (20:56 +0800)]
regulator: Fix off-by-one value range checking for mc13xxx_regulator_get_voltage

We use val as array index,
thus the valid value rangae for val should be 0 .. n_voltages-1.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoregulator: mc13892: Fix voltage unit in test case.
Fabio Estevam [Mon, 16 May 2011 13:54:27 +0000 (10:54 -0300)]
regulator: mc13892: Fix voltage unit in test case.

Voltage values should be expressed in microvolts, not in milivolts.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoregulator: Remove MAX8997_REG_BUCK1DVS/MAX8997_REG_BUCK2DVS/MAX8997_REG_BUCK5DVS...
Axel Lin [Mon, 16 May 2011 10:20:34 +0000 (18:20 +0800)]
regulator: Remove MAX8997_REG_BUCK1DVS/MAX8997_REG_BUCK2DVS/MAX8997_REG_BUCK5DVS macros

In current implementation, the original macro implementation assumes the caller
pass the parameter starting from 1 (to match the register names in datasheet).
Thus we have unneeded plus one then minus one operations
when using MAX8997_REG_BUCK1DVS/MAX8997_REG_BUCK2DVS/MAX8997_REG_BUCK5DVS macros.

This patch removes these macros to avoid unneeded plus one then minus one operations
without reducing readability.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agomfd: Fix off-by-one value range checking for tps65910_i2c_write
Axel Lin [Mon, 16 May 2011 14:19:01 +0000 (22:19 +0800)]
mfd: Fix off-by-one value range checking for tps65910_i2c_write

If bytes == (TPS65910_MAX_REGISTER + 1), we have a buffer overflow when
doing memcpy(&msg[1], src, bytes).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoregulator: Only apply voltage constraints from consumers that set them
Mark Brown [Sat, 14 May 2011 20:42:34 +0000 (13:42 -0700)]
regulator: Only apply voltage constraints from consumers that set them

When applying the set_voltage() requests from consumers skip over those
consumers that haven't set anything, otherwise we'll come out with a
maximum voltage of zero.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>