deliverable/linux.git
12 years agostaging: et131x: Update tx trans_start on device close to prevent tx_timeout
Mark Einon [Tue, 23 Aug 2011 22:40:40 +0000 (23:40 +0100)] 
staging: et131x: Update tx trans_start on device close to prevent tx_timeout

Updating the tx trans_start before closing the device prevents a possible tx_timeout occuring during the closing process.
Tested on an ET1310 device.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: et131x: Fix free IRQ from IRQ context warning after tx_timeout
Mark Einon [Tue, 23 Aug 2011 22:40:39 +0000 (23:40 +0100)] 
staging: et131x: Fix free IRQ from IRQ context warning after tx_timeout

When a tx timeout occured, et131x_tx_timeout closed and re-opened the device to fix.
As et131x_close called free_irq(), bad things ensued (see warning trace below), namely a
storm of errors and warnings.
Fixed by replacing the close() and open() calls with just the relevant functions previously
called from these.
Verified on an ET-1310 device.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
----------
Aug  2 21:26:08 msilap kernel: [ 6484.816024] ------------[ cut here ]------------
Aug  2 21:26:08 msilap kernel: [ 6484.816039] WARNING: at /home/mark/Source/staging-2.6/net/sched/sch_generic.c:255 dev_watchdog+0xf0/0x150()
Aug  2 21:26:08 msilap kernel: [ 6484.816045] Hardware name: MS-1727
Aug  2 21:26:08 msilap kernel: [ 6484.816050] NETDEV WATCHDOG: eth1 (et131x): transmit queue 0 timed out
Aug  2 21:26:08 msilap kernel: [ 6484.816054] Modules linked in: et131x(C) aes_generic tcp_lp fuse nouveau ttm drm_kms_helper drm i2c_algo_bit sunrpc ipv6 cpufreq_ondemand acpi_cpufreq freq_table mperf uinput arc4 iwlagn snd_hda_codec_hdmi mac80211 sdhci_pci sdhci snd_hda_codec_realtek cfg80211 snd_hda_intel snd_hda_codec mmc_core snd_hwdep firewire_ohci firewire_core jmb38x_ms snd_seq snd_seq_device snd_pcm mxm_wmi ir_lirc_codec lirc_dev ir_sony_decoder i2c_i801 ir_jvc_decoder ir_rc6_decoder rc_rc6_mce i7core_edac edac_core snd_timer pcspkr rfkill r8169 mii i2c_core video ir_rc5_decoder memstick iTCO_wdt iTCO_vendor_support ir_nec_decoder ene_ir rc_core joydev microcode wmi snd crc_itu_t soundcore snd_page_alloc [last unloaded: et131x]
Aug  2 21:26:08 msilap kernel: [ 6484.816163] Pid: 0, comm: kworker/0:1 Tainted: G         C  3.0.0-rc6+ #21
Aug  2 21:26:08 msilap kernel: [ 6484.816167] Call Trace:
Aug  2 21:26:08 msilap kernel: [ 6484.816171]  <IRQ>  [<ffffffff8103caf4>] warn_slowpath_common+0x85/0x9d
Aug  2 21:26:08 msilap kernel: [ 6484.816189]  [<ffffffff8103cbaf>] warn_slowpath_fmt+0x46/0x48
Aug  2 21:26:08 msilap kernel: [ 6484.816196]  [<ffffffff813aa6fb>] ? netif_tx_lock+0x4a/0x7b
Aug  2 21:26:08 msilap kernel: [ 6484.816203]  [<ffffffff813aa86f>] dev_watchdog+0xf0/0x150
Aug  2 21:26:08 msilap kernel: [ 6484.816211]  [<ffffffff810497b6>] run_timer_softirq+0x1a9/0x279
Aug  2 21:26:08 msilap kernel: [ 6484.816218]  [<ffffffff813aa77f>] ? netif_tx_unlock+0x53/0x53
Aug  2 21:26:08 msilap kernel: [ 6484.816226]  [<ffffffff810429d7>] __do_softirq+0xd5/0x1a4
Aug  2 21:26:08 msilap kernel: [ 6484.816234]  [<ffffffff810079ed>] ? paravirt_read_tsc+0x9/0xd
Aug  2 21:26:08 msilap kernel: [ 6484.816245]  [<ffffffff8144561c>] call_softirq+0x1c/0x26
Aug  2 21:26:08 msilap kernel: [ 6484.816251]  [<ffffffff81003b9f>] do_softirq+0x46/0x83
Aug  2 21:26:08 msilap kernel: [ 6484.816257]  [<ffffffff81042ca2>] irq_exit+0x52/0x9b
Aug  2 21:26:08 msilap kernel: [ 6484.816265]  [<ffffffff81445749>] smp_apic_timer_interrupt+0x7c/0x8a
Aug  2 21:26:08 msilap kernel: [ 6484.816273]  [<ffffffff814450d3>] apic_timer_interrupt+0x13/0x20
Aug  2 21:26:08 msilap kernel: [ 6484.816278]  <EOI>  [<ffffffff810079ed>] ? paravirt_read_tsc+0x9/0xd
Aug  2 21:26:08 msilap kernel: [ 6484.816291]  [<ffffffff8124ad87>] ? intel_idle+0xd1/0xf8
Aug  2 21:26:08 msilap kernel: [ 6484.816297]  [<ffffffff8124ad69>] ? intel_idle+0xb3/0xf8
Aug  2 21:26:08 msilap kernel: [ 6484.816306]  [<ffffffff8136a767>] cpuidle_idle_call+0xe2/0x160
Aug  2 21:26:08 msilap kernel: [ 6484.816315]  [<ffffffff81001293>] cpu_idle+0xaa/0xcc
Aug  2 21:26:08 msilap kernel: [ 6484.816323]  [<ffffffff81436b4e>] start_secondary+0x248/0x24f
Aug  2 21:26:08 msilap kernel: [ 6484.816329] ---[ end trace 10ae1b2c6bae932f ]---
Aug  2 21:26:08 msilap kernel: [ 6484.816337] et131x 0000:02:00.0: Send stuck - reset.  tcb->WrIndex 0, flags 0x00000000
Aug  2 21:26:08 msilap kernel: [ 6484.816344] ------------[ cut here ]------------
Aug  2 21:26:08 msilap kernel: [ 6484.816353] WARNING: at /home/mark/Source/staging-2.6/kernel/irq/manage.c:1131 __free_irq+0x58/0x192()
Aug  2 21:26:08 msilap kernel: [ 6484.816358] Hardware name: MS-1727
Aug  2 21:26:08 msilap kernel: [ 6484.816362] Trying to free IRQ 16 from IRQ context!
Aug  2 21:26:08 msilap kernel: [ 6484.816365] Modules linked in: et131x(C) aes_generic tcp_lp fuse nouveau ttm drm_kms_helper drm i2c_algo_bit sunrpc ipv6 cpufreq_ondemand acpi_cpufreq freq_table mperf uinput arc4 iwlagn snd_hda_codec_hdmi mac80211 sdhci_pci sdhci snd_hda_codec_realtek cfg80211 snd_hda_intel snd_hda_codec mmc_core snd_hwdep firewire_ohci firewire_core jmb38x_ms snd_seq snd_seq_device snd_pcm mxm_wmi ir_lirc_codec lirc_dev ir_sony_decoder i2c_i801 ir_jvc_decoder ir_rc6_decoder rc_rc6_mce i7core_edac edac_core snd_timer pcspkr rfkill r8169 mii i2c_core video ir_rc5_decoder memstick iTCO_wdt iTCO_vendor_support ir_nec_decoder ene_ir rc_core joydev microcode wmi snd crc_itu_t soundcore snd_page_alloc [last unloaded: et131x]
Aug  2 21:26:08 msilap kernel: [ 6484.816459] Pid: 0, comm: kworker/0:1 Tainted: G        WC  3.0.0-rc6+ #21
Aug  2 21:26:08 msilap kernel: [ 6484.816464] Call Trace:
Aug  2 21:26:08 msilap kernel: [ 6484.816467]  <IRQ>  [<ffffffff8103caf4>] warn_slowpath_common+0x85/0x9d
Aug  2 21:26:08 msilap kernel: [ 6484.816480]  [<ffffffff8103cbaf>] warn_slowpath_fmt+0x46/0x48
Aug  2 21:26:08 msilap kernel: [ 6484.816488]  [<ffffffff81092276>] __free_irq+0x58/0x192
Aug  2 21:26:08 msilap kernel: [ 6484.816496]  [<ffffffff8109240e>] free_irq+0x5e/0x77
Aug  2 21:26:08 msilap kernel: [ 6484.816506]  [<ffffffffa00bf58e>] et131x_close+0x4b/0x5e [et131x]
Aug  2 21:26:08 msilap kernel: [ 6484.816516]  [<ffffffffa00bf64d>] et131x_tx_timeout+0xac/0xc7 [et131x]
Aug  2 21:26:08 msilap kernel: [ 6484.816523]  [<ffffffff813aa883>] dev_watchdog+0x104/0x150
Aug  2 21:26:08 msilap kernel: [ 6484.816530]  [<ffffffff810497b6>] run_timer_softirq+0x1a9/0x279
Aug  2 21:26:08 msilap kernel: [ 6484.816537]  [<ffffffff813aa77f>] ? netif_tx_unlock+0x53/0x53
Aug  2 21:26:08 msilap kernel: [ 6484.816544]  [<ffffffff810429d7>] __do_softirq+0xd5/0x1a4
Aug  2 21:26:08 msilap kernel: [ 6484.816552]  [<ffffffff810079ed>] ? paravirt_read_tsc+0x9/0xd
Aug  2 21:26:08 msilap kernel: [ 6484.816560]  [<ffffffff8144561c>] call_softirq+0x1c/0x26
Aug  2 21:26:08 msilap kernel: [ 6484.816566]  [<ffffffff81003b9f>] do_softirq+0x46/0x83
Aug  2 21:26:08 msilap kernel: [ 6484.816572]  [<ffffffff81042ca2>] irq_exit+0x52/0x9b
Aug  2 21:26:08 msilap kernel: [ 6484.816580]  [<ffffffff81445749>] smp_apic_timer_interrupt+0x7c/0x8a
Aug  2 21:26:08 msilap kernel: [ 6484.816588]  [<ffffffff814450d3>] apic_timer_interrupt+0x13/0x20
Aug  2 21:26:08 msilap kernel: [ 6484.816592]  <EOI>  [<ffffffff810079ed>] ? paravirt_read_tsc+0x9/0xd
Aug  2 21:26:08 msilap kernel: [ 6484.816604]  [<ffffffff8124ad87>] ? intel_idle+0xd1/0xf8
Aug  2 21:26:08 msilap kernel: [ 6484.816610]  [<ffffffff8124ad69>] ? intel_idle+0xb3/0xf8
Aug  2 21:26:08 msilap kernel: [ 6484.816617]  [<ffffffff8136a767>] cpuidle_idle_call+0xe2/0x160
Aug  2 21:26:08 msilap kernel: [ 6484.816625]  [<ffffffff81001293>] cpu_idle+0xaa/0xcc
Aug  2 21:26:08 msilap kernel: [ 6484.816632]  [<ffffffff81436b4e>] start_secondary+0x248/0x24f
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: et131x: Fix link detection signalling
Mark Einon [Tue, 23 Aug 2011 22:40:38 +0000 (23:40 +0100)] 
staging: et131x: Fix link detection signalling

Remove redundant code around netif_carrier_XXX calls, and associated adapter->media_state, which prevented the link from being reported as off.
Tested on an ET-1310 device.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: et131x: Rename var name 'etdev' to 'adapter' throughout module
Mark Einon [Tue, 23 Aug 2011 22:40:37 +0000 (23:40 +0100)] 
staging: et131x: Rename var name 'etdev' to 'adapter' throughout module

Used regex (from vim) :%s/\<etdev\>/adapter/g

Changed because:
* 'etdev' is easily confused as a misspelling of 'netdev'
* 'adapter' is more widely used for this struct type in net drivers. This
change made comparing code with other drivers much easier.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: et131x: Removing commented out code implemented elsewhere
Mark Einon [Tue, 23 Aug 2011 22:40:36 +0000 (23:40 +0100)] 
staging: et131x: Removing commented out code implemented elsewhere

Function et131x_set_mac_addr() contains commented out code that has been moved to
et131x_change_mtu() in the same file.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: et131x: Converting et1310_adapter.h variable names from CamelCase
Mark Einon [Tue, 23 Aug 2011 22:40:35 +0000 (23:40 +0100)] 
staging: et131x: Converting et1310_adapter.h variable names from CamelCase

Tested on an ET-131x device.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: et131x: Converting et1310_tx.c function and local names from CamelCase
Mark Einon [Tue, 23 Aug 2011 22:40:34 +0000 (23:40 +0100)] 
staging: et131x: Converting et1310_tx.c function and local names from CamelCase

Also some minor code clean-ups.
Tested on an ET-131x device.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: et131x: Remove unecessary *etdev NULL check in et1310_phy_init()
Mark Einon [Tue, 23 Aug 2011 22:40:33 +0000 (23:40 +0100)] 
staging: et131x: Remove unecessary *etdev NULL check in et1310_phy_init()

It is impossible to get to this function with the pointer being NULL.
Tested on an ET-131x device.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: hv: Fix macros, tab errors and warning in drivers/staging/hv/hv_mouse.c
Ruslan Pisarev [Fri, 22 Jul 2011 12:12:47 +0000 (15:12 +0300)] 
Staging: hv: Fix macros, tab errors and warning in drivers/staging/hv/hv_mouse.c

This is a patch to the hv_mouse.c file that fixed up macros, tab
errors and warning found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: hv: util: kvp: Cleanup kvp_get_domain_name()
K. Y. Srinivasan [Tue, 26 Jul 2011 18:03:10 +0000 (11:03 -0700)] 
Staging: hv: util: kvp: Cleanup kvp_get_domain_name()

Cleanup kvp_get_domain_name(). If getaddrinfo() fails, deal with it properly
(this can happen if no IP address has been assigned). Also, don't specify
a specific service in the call to getaddrinfo() to make this code as generic
as possible. Lastly, move the call to gethostname() after the local variables.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: hv: util: kvp: Fix the reported OSVersion string
K. Y. Srinivasan [Fri, 22 Jul 2011 17:14:31 +0000 (10:14 -0700)] 
Staging: hv: util: kvp: Fix the reported OSVersion string

The current win7 host does not like it when we return the
complete kernel release information. Conform to what the host
expects.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: hv: vmbus: Fix checkpatch warnings
K. Y. Srinivasan [Tue, 19 Jul 2011 18:44:21 +0000 (11:44 -0700)] 
Staging: hv: vmbus: Fix checkpatch warnings

Fix  checkpatch warnings in hv.c

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: hv: tools: Fix a checkpatch warning in hv_kvp_daemon.c
K. Y. Srinivasan [Tue, 19 Jul 2011 18:44:20 +0000 (11:44 -0700)] 
Staging: hv: tools: Fix a checkpatch warning in hv_kvp_daemon.c

Fix a checkpatch warning in hv_kvp_daemon.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: hv: vmbus: Don't wait indefinitely for IRQ resouces
K. Y. Srinivasan [Fri, 15 Jul 2011 20:38:56 +0000 (13:38 -0700)] 
Staging: hv: vmbus: Don't wait indefinitely for IRQ resouces

If an attempt is made to load the vmbus driver on a non-Hyper-V platform,
the load operation will hang since we currently wait indefinitely to
retrieve the IRQ information. This is done in the context of an acpi callback
context (which will obviously not happen when this driver is
loaded on a non-Hyper-V platform). This patch fixes the problem.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: go7007: fix braces coding style issue in wis-tw2804.c
Pradheep Shrinivasan [Sat, 20 Aug 2011 06:15:26 +0000 (23:15 -0700)] 
Staging: go7007: fix braces coding style issue in wis-tw2804.c

This is a patch to the wis-tw2804.c to fix the braces coding style issue as pointed by checkpatch.pl tool

Signed-off-by: Pradheep Shrinivasan <pradheep.sh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging : winbond : fix coding style issue in phy_calibration.c
Vincent Abel-Grimalt [Tue, 9 Aug 2011 23:13:38 +0000 (01:13 +0200)] 
Staging : winbond : fix coding style issue in phy_calibration.c

Thus us a patch to the phy_calibration.c file that fixes up coding style warning found by the checkpatch.pl tool

Signed-off-by: Vincent Abel-Grimalt <kolymine@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agodrivers/staging: do not use EXTRA_CFLAGS
Arnaud Lacombe [Mon, 15 Aug 2011 05:07:12 +0000 (01:07 -0400)] 
drivers/staging: do not use EXTRA_CFLAGS

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: spectra: Use memdup_user
Thomas Meyer [Sat, 13 Aug 2011 08:48:57 +0000 (10:48 +0200)] 
staging: spectra: Use memdup_user

 Use kmemdup_user rather than duplicating its implementation
 This is a little bit restricted to reduce false positives

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/memdup_user.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging/easycap: Use memdup_user
Thomas Meyer [Sat, 13 Aug 2011 09:09:26 +0000 (11:09 +0200)] 
staging/easycap: Use memdup_user

 Use kmemdup_user rather than duplicating its implementation
 This is a little bit restricted to reduce false positives

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/memdup_user.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: rts_pstor: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 09:27:10 +0000 (11:27 +0200)] 
staging: rts_pstor: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: tidspbridge: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 09:39:08 +0000 (11:39 +0200)] 
staging: tidspbridge: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: ft1000: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 09:31:48 +0000 (11:31 +0200)] 
staging: ft1000: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: rts_pstor: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 09:28:50 +0000 (11:28 +0200)] 
Staging: rts_pstor: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: altera-stapl: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 09:34:09 +0000 (11:34 +0200)] 
staging: altera-stapl: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: rts_pstor: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 14:14:03 +0000 (16:14 +0200)] 
staging: rts_pstor: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: serqt_usb2: fix sleeping with spinlock held
Alexey Khoroshilov [Tue, 9 Aug 2011 06:23:42 +0000 (10:23 +0400)] 
Staging: serqt_usb2: fix sleeping with spinlock held

The patch replaces spinlock with mutex.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: fix ft1000 sparse warnings
Randy Dunlap [Mon, 8 Aug 2011 18:31:48 +0000 (11:31 -0700)] 
staging: fix ft1000 sparse warnings

Fix sparse warnings in staging/ft1000/:

drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:69:7: warning: obsolete struct initializer, use C99 syntax

and make many functions & data static.  Examples:
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:65:23: warning: symbol 'fw_entry' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:836:6: warning: symbol 'ft1000_send_cmd' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:1014:6: warning: symbol 'ft1000_proc_drvmsg' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:1788:5: warning: symbol 'ft1000_copy_down_pkt' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:2096:6: warning: symbol 'stop_ft1000_card' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:2155:19: warning: symbol 'init_ft1000_card' was not declared. Should it be static?

rivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c:172:5: warning: symbol 'ft1000_confcheck' was not declared. Should it be static?

drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:50:5: warning: symbol 'ft1000ReadProc' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:194:6: warning: symbol 'ft1000InitProc' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:207:6: warning: symbol 'ft1000CleanupProc' was not declared. Should it be static?

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: bcm: Macros: Fixed multiple coding style violations.
Ben Wright [Wed, 17 Aug 2011 03:42:50 +0000 (13:42 +1000)] 
Staging: bcm: Macros: Fixed multiple coding style violations.

Fixed multiple indentation issues.

Signed-off-by: Benjamin James Wright <bwright.au@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agodrivers/staging/bcm/nvm.c: add missing kfree
Julia Lawall [Mon, 8 Aug 2011 11:17:58 +0000 (13:17 +0200)] 
drivers/staging/bcm/nvm.c: add missing kfree

Buff is only used as a temporary buffer within the function, so it should
be freed before leaving the function in an error case.

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

// <smpl>
@exists@
local idexpression x;
statement S,S1;
expression E;
identifier fl;
expression *ptr != NULL;
@@

x = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...kfree(x)...+> }
     when any
     when != true x == NULL
x->fl
...>
(
if (x == NULL) S1
|
if (...) { ... when != x
               when forall
(
 return \(0\|<+...x...+>\|ptr\);
|
* return ...;
)
}
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: bcm: Fix memory leak reported during compile.
Kevin McKinney [Tue, 16 Aug 2011 02:12:15 +0000 (22:12 -0400)] 
Staging: bcm: Fix memory leak reported during compile.

This patch fixes a potential memory leak were temp_buff buffer
is not being freed when a certain condition is true.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: bcm: Fix a coding style error reported by checkpatch.pl
Kevin McKinney [Tue, 16 Aug 2011 02:10:12 +0000 (22:10 -0400)] 
Staging: bcm: Fix a coding style error reported by checkpatch.pl

Tool checkpatch.pl reported the following error: extern struct class *bcm_class;"
declaration not allowed in .c files. Therefore, I move this declaration into
the header "headers.h" file.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: bcm: fix coding style warnings and errors reported by checkpatch.pl tool
Kevin McKinney [Tue, 16 Aug 2011 02:07:41 +0000 (22:07 -0400)] 
staging: bcm: fix coding style warnings and errors reported by checkpatch.pl tool

Staging: bcm: Fix coding style errors reported by checkpatch.pl

Fix multiple warnings and errors reported by checkpatch.pl

Signed-off-by: Kevin McKinney<klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: rtl8712: remove r8712_cmd_thread()->daemonize()
Oleg Nesterov [Tue, 16 Aug 2011 18:50:57 +0000 (20:50 +0200)] 
staging: rtl8712: remove r8712_cmd_thread()->daemonize()

daemonize() is only needed when a user-space task does kernel_thread().

r8712_cmd_thread() is kthread_create()'ed and thus it doesn't need
the soon-to-be-deprecated daemonize(). It is the only caller of
thread_enter() which actually does the call.

Note:
- we are going to remove the sigdelset(blocked) code from
  allow_signal(), this means that without this patch
  thread_enter() can't work after that. Not to mention
  daemonize() should be deprecated.

- as a side effect, this patch changes ->comm. Hopefully
  this is fine, and padapter->pnetdev->name probably makes
  more sense anyway.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Matt Fleming <matt.fleming@intel.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-and-tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agortl8712: don't just return -EFAULT in wpa_supplicant_ioctl()
Dan Carpenter [Sat, 6 Aug 2011 14:27:48 +0000 (07:27 -0700)] 
rtl8712: don't just return -EFAULT in wpa_supplicant_ioctl()

There were some curly braces missing so the original code in
wpa_supplicant_ioctl() pretty much always returned -EFAULT without
doing anything.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: vme: keep track of registered buses
Manohar Vanga [Fri, 12 Aug 2011 10:30:48 +0000 (12:30 +0200)] 
staging: vme: keep track of registered buses

This patch adds a list which keeps track of all registered VME
buses. This is required for adding refcounting later to bridge
modules, something that is not currently implemented.

This is based on the changes introduced by Emilio G. Cota in the
patch:

    https://lkml.org/lkml/2010/10/25/486

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: vme: make [alloc|free]_consistent bridge specific
Manohar Vanga [Wed, 10 Aug 2011 09:33:46 +0000 (11:33 +0200)] 
staging: vme: make [alloc|free]_consistent bridge specific

Make PCI dependent functions ([alloc|free]_consistent() in
'vme.c') bridge specific. By removing the dependency of the
VME bridge framework on PCI, this patch allows for addition of
non-PCI based VME bridges.

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: vme_user: change kmalloc+memset to kzalloc
Manohar Vanga [Mon, 1 Aug 2011 10:20:46 +0000 (12:20 +0200)] 
staging: vme_user: change kmalloc+memset to kzalloc

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: zcache: fix typos
Seth Jennings [Mon, 22 Aug 2011 18:50:08 +0000 (13:50 -0500)] 
staging: zcache: fix typos

The patch fixes two typos in zcache-main.c

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: zcache: fix possible sleep under lock
Seth Jennings [Mon, 22 Aug 2011 19:30:38 +0000 (14:30 -0500)] 
staging: zcache: fix possible sleep under lock

zcache_new_pool() calls kmalloc() with GFP_KERNEL which has
__GFP_WAIT set.  However, zcache_new_pool() gets called on
a stack that holds the swap_lock spinlock, leading to a
possible sleep-with-lock situation. The lock is obtained
in enable_swap_info().

The patch replaces GFP_KERNEL with GFP_ATOMIC.

v2: replace with GFP_ATOMIC, not GFP_IOFS

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agodrivers/staging/rtl8192u: Don't pass huge struct by value
Jesper Juhl [Fri, 12 Aug 2011 22:53:07 +0000 (00:53 +0200)] 
drivers/staging/rtl8192u: Don't pass huge struct by value

struct ieee80211_network is fairly large (more than half a kilobyte),
so let's pass a pointer instead of passing the entire structure by
value when ieee80211_is_54g() and ieee80211_is_shortslot() need to
look at a few members.
Also remove parentheses around the values being returned from those
two functions - 'return' is not a function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agodrivers/staging/rtl8187se: Don't pass huge struct by value
Jesper Juhl [Fri, 12 Aug 2011 22:51:40 +0000 (00:51 +0200)] 
drivers/staging/rtl8187se: Don't pass huge struct by value

struct ieee80211_network is fairly large (more than half a kilobyte),
so let's pass a pointer instead of passing the entire structure by
value when ieee80211_is_54g() and ieee80211_is_shortslot() need to
look at a few members.
Also remove parentheses around the values being returned from those
two functions - 'return' is not a function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agodrivers/staging/usbip/userspace/libsrc/vhci_driver.c: test the just-initialized value
Julia Lawall [Mon, 22 Aug 2011 14:00:33 +0000 (16:00 +0200)] 
drivers/staging/usbip/userspace/libsrc/vhci_driver.c: test the just-initialized value

Test the just-initialized value rather than some other one.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier x,y,f!={PTR_ERR,ERR_PTR,ERR_CAST};
statement S;
@@

x = f(...);
(
if (\(x == NULL\|IS_ERR(x)\)) S
|
*if (\(y == NULL\|IS_ERR(y)\))
 { ... when != x
   return ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: David Chang <dchang@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: usbip: Add header guards to stub.h and vhci.h
Tobias Klauser [Mon, 22 Aug 2011 06:53:28 +0000 (08:53 +0200)] 
staging: usbip: Add header guards to stub.h and vhci.h

stub.h and vhci.h are missing proper #ifndef/#define header guards, so
add them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: usbip: add a usbip protocol document
Márton Németh [Mon, 22 Aug 2011 01:52:47 +0000 (09:52 +0800)] 
staging: usbip: add a usbip protocol document

Initial version of USBIP protocol document.

Signed-off-by: David Chang <dchang@suse.com>
Acked-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: usbip: userspace: Check return value for mkdir()
Tobias Klauser [Fri, 19 Aug 2011 06:54:18 +0000 (08:54 +0200)] 
staging: usbip: userspace: Check return value for mkdir()

mkdir() could fail, so we should check its return value.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: usbip: Fix braces and spaces to match coding style.
Akshay Joshi [Wed, 17 Aug 2011 19:58:32 +0000 (15:58 -0400)] 
Staging: usbip: Fix braces and spaces to match coding style.

Fix brace positioning and spaces at the start of lines in order to
comply with the kernel coding style.

Signed-off-by: Akshay Joshi <me@akshayjoshi.com>
Acked-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: usbip: Remove trailing spaces.
Akshay Joshi [Wed, 17 Aug 2011 19:58:31 +0000 (15:58 -0400)] 
Staging: usbip: Remove trailing spaces.

Remove trailing spaces to comply with the kernel coding style.

Signed-off-by: Akshay Joshi <me@akshayjoshi.com>
Acked-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: keucr: fix comments, braces, whitespaces coding style issue in tm6000.h
Ruslan Pisarev [Fri, 22 Jul 2011 11:17:23 +0000 (14:17 +0300)] 
Staging: keucr: fix comments, braces, whitespaces coding style issue in tm6000.h

This is a patch to the smilsub.c file that fixed up comment, braces,
whitespaces error found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: keucr: Remove dead (comment) code in drivers/staging/keucr/smilsub.c
Ruslan Pisarev [Fri, 22 Jul 2011 11:17:04 +0000 (14:17 +0300)] 
Staging: keucr: Remove dead (comment) code in drivers/staging/keucr/smilsub.c

Remove dead (comment) code in drivers/staging/keucr/smilsub.c

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: keucr: Coding style fixes in scsiglue.c
Ruslan Pisarev [Fri, 22 Jul 2011 11:16:48 +0000 (14:16 +0300)] 
Staging: keucr: Coding style fixes in scsiglue.c

Fixed macros in scsiglue.c

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: keucr: Coding style fixes in smil.h
Ruslan Pisarev [Fri, 22 Jul 2011 11:16:34 +0000 (14:16 +0300)] 
Staging: keucr: Coding style fixes in smil.h

Fixed brace style in smil.h

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: keucr: Coding style fixes in smscsi.c
Ruslan Pisarev [Fri, 22 Jul 2011 11:16:23 +0000 (14:16 +0300)] 
Staging: keucr: Coding style fixes in smscsi.c

I fixed whitespace, brace style and commetnt in smscsi.c

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: olpc_dcon: replace remaining calls to i2c_smbus_read/write
Andres Salomon [Fri, 22 Jul 2011 03:38:01 +0000 (20:38 -0700)] 
staging: olpc_dcon: replace remaining calls to i2c_smbus_read/write

Use dcon_read and dcon_write; shorter, and understands the dcon_priv
struct.  This transition was started long ago.  This converts the
last few i2c_smbus_* callers.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: olpc_dcon: drop support for DCON v1
Andres Salomon [Fri, 22 Jul 2011 03:37:55 +0000 (20:37 -0700)] 
staging: olpc_dcon: drop support for DCON v1

The v1 DCONs only existed for XO-1 prototypes (and even then, very very
early prototypes).  Drop support for v1 DCON.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: olpc_dcon: remove noinit module variable
Andres Salomon [Fri, 22 Jul 2011 03:37:43 +0000 (20:37 -0700)] 
staging: olpc_dcon: remove noinit module variable

This came from Jordan's original 2007 gxfb_dcon commit.  I've never
seen or heard of it actually being used.  Presumably it was once
useful for skipping hardware initialization when reloading the module
over and over during driver development..

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: vt6656: use %pM for printing MACs
Andy Shevchenko [Tue, 26 Jul 2011 07:35:31 +0000 (10:35 +0300)] 
staging: vt6656: use %pM for printing MACs

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: vt6655: simplify MAC printing by using %pM
Andy Shevchenko [Tue, 26 Jul 2011 07:35:30 +0000 (10:35 +0300)] 
staging: vt6655: simplify MAC printing by using %pM

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: zram: make global var "num_devices" use unique name
Noah Watkins [Wed, 20 Jul 2011 23:06:08 +0000 (17:06 -0600)] 
staging: zram: make global var "num_devices" use unique name

The global variable "num_devices" is too general to be
global. This patch switches the name to be "zram_num_devices".

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: zram: make global var "devices" use unique name
Noah Watkins [Wed, 20 Jul 2011 23:05:57 +0000 (17:05 -0600)] 
staging: zram: make global var "devices" use unique name

The global variable "devices" is too general to be global.
This patch switches the name to be "zram_devices".

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: remove ath6kl
Kalle Valo [Fri, 12 Aug 2011 19:08:00 +0000 (22:08 +0300)] 
staging: remove ath6kl

ath6kl is now in drivers/net/wireless/ath so the staging driver
is not supported anymore and should be removed.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: pohmelfs: Coding style fixes in trans.c
Ruslan Pisarev [Mon, 25 Jul 2011 14:26:47 +0000 (17:26 +0300)] 
Staging: pohmelfs: Coding style fixes in trans.c

I fixed whitespace in drivers/staging/pohmelfs/trans.c

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: replace video_type with FB_TYPE_PACKED_PIXELS
Aaro Koskinen [Fri, 19 Aug 2011 19:40:27 +0000 (22:40 +0300)] 
staging: xgifb: replace video_type with FB_TYPE_PACKED_PIXELS

Replace a global variable with a constant.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: probe: delete checks for mode "none"
Aaro Koskinen [Fri, 19 Aug 2011 19:40:26 +0000 (22:40 +0300)] 
staging: xgifb: probe: delete checks for mode "none"

The driver does not allow selecting the mode "none", so no need to check
for that in probe.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: eliminate #ifdef XGIFB_PAN
Aaro Koskinen [Fri, 19 Aug 2011 19:40:25 +0000 (22:40 +0300)] 
staging: xgifb: eliminate #ifdef XGIFB_PAN

XGIFB_PAN is always defined and checks can be eliminated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: delete unused structs
Aaro Koskinen [Fri, 19 Aug 2011 19:40:24 +0000 (22:40 +0300)] 
staging: xgifb: delete unused structs

Delete unused struct declarations.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: vb_table: delete unused data
Aaro Koskinen [Fri, 19 Aug 2011 19:40:23 +0000 (22:40 +0300)] 
staging: xgifb: vb_table: delete unused data

Delete unused data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: delete unused definitions
Aaro Koskinen [Fri, 19 Aug 2011 19:40:22 +0000 (22:40 +0300)] 
staging: xgifb: delete unused definitions

Delete some more unused definitions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: delete duplicate #defines
Aaro Koskinen [Fri, 19 Aug 2011 19:40:21 +0000 (22:40 +0300)] 
staging: xgifb: delete duplicate #defines

Delete duplicate identical #defines.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: eliminate #ifdef NewScratch
Aaro Koskinen [Fri, 19 Aug 2011 19:40:19 +0000 (22:40 +0300)] 
staging: xgifb: eliminate #ifdef NewScratch

NewScratch is always defined so all checks can be eliminated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: xgifb: Delete define XGIINITSTATIC in XGI_main_26.c and XGI_main.h
Ruslan Pisarev [Thu, 21 Jul 2011 08:59:11 +0000 (11:59 +0300)] 
Staging: xgifb: Delete define XGIINITSTATIC in XGI_main_26.c and XGI_main.h

This is a patch to the XGI_main.h and XGI_main_26.c file that fixed up a define warrning found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_mai...
Ruslan Pisarev [Thu, 21 Jul 2011 08:58:53 +0000 (11:58 +0300)] 
Staging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_main_26.c

This is a patch to the XGI_main_26.c file that fixed up a errors "do not initialise statics to 0 or NULL" found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_main.h
Ruslan Pisarev [Thu, 21 Jul 2011 08:57:40 +0000 (11:57 +0300)] 
Staging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_main.h

This is a patch to the XGI_main.h file that fixed up a errors "do not initialise statics to 0 or NULL" found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoIIO: ADC: New driver for AD7190/AD7192/AD7195 4 Channel SPI ADC
Michael Hennerich [Wed, 17 Aug 2011 15:29:34 +0000 (17:29 +0200)] 
IIO: ADC: New driver for AD7190/AD7192/AD7195 4 Channel SPI ADC

New driver for AD7190/AD7192/AD7195 4.8 kHz, Ultralow Noise, 24-Bit
Sigma-Delta ADC with PGA

These devices features a dual use data out ready DOUT/RDY output.
In order to avoid contentions on the SPI bus, it's necessary to use
spi bus locking. The DOUT/RDY output must also be wired to an
interrupt capable GPIO.

In INDIO_RING_TRIGGERED mode, this driver may block its SPI bus segment
for an extended period of time.

Changes since V1:

Add missing documentation.
Remove obsoleted include files.
Fix typos and style issues.
Fix buffer size.
Split ad7192_show() into two functions.
Avoid race condition add mutex.
Abandon IIO_CHAN macro.
Reorder elements in ad7192_platform_data.
Remove driver bus type.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:imu:adis16344 support
Jonathan Cameron [Fri, 12 Aug 2011 17:04:37 +0000 (18:04 +0100)] 
staging:iio:imu:adis16344 support

Simple device. Note the sparse scan mask used.

Done from datasheet as very similar to existing parts.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoSTAGING:iio:light: fix ISL29018 init to handle brownout
Grant Grundler [Tue, 9 Aug 2011 22:18:14 +0000 (15:18 -0700)] 
STAGING:iio:light: fix ISL29018 init to handle brownout

After a voltage brownout, sensor will now operate correctly.

Page 10 of ISL29018 data sheet and the Intersil Application Note 1534
describe the required initialization sequence:
1. Write 0x00 to register 0x08 (TEST)
2. Write 0x00 to register 0x00 (CMD1)
3. msleep(1)
4. program remaining registers as before

Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoiio: impedance-analyzer: New driver for AD5933/4 Impedance Converter, Network Analyzer
Michael Hennerich [Tue, 2 Aug 2011 06:48:22 +0000 (08:48 +0200)] 
iio: impedance-analyzer: New driver for AD5933/4 Impedance Converter, Network Analyzer

The AD5933 is a high precision impedance converter system solution
that combines an on-board frequency generator with a 12-bit, 1 MSPS,
analog-to-digital converter (ADC). The frequency generator allows an
external complex impedance to be excited with a known frequency.

The response signal from the impedance is sampled by the on-board ADC
and a discrete Fourier transform (DFT) is processed by an on-chip DSP engine.
The DFT algorithm returns a real (R) and imaginary (I) data-word at each
output frequency.

Changes since V1:

Apply list review feedback:
Consistently use poll_time_jiffies.
Use be|le cpu endian helpers where applicable.
Add various comments.

Changes since V2:

Fix KernelVersion tag in Documentation.
Declare ad5933_default_pdata static.
Fix typos.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoiio: adc: New driver for AD7280A Lithium Ion Battery Monitoring System
Michael Hennerich [Wed, 20 Jul 2011 13:03:09 +0000 (15:03 +0200)] 
iio: adc: New driver for AD7280A Lithium Ion Battery Monitoring System

The AD7280A monitoring system contains all the functions required for
general purpose monitoring and maintenance of stacked
lithium ion batteries as used in hybrid electric vehicles,
battery backup applications, etc.

Changes since V1:

Make cell channels all type IIO_IN_DIFF, update documentation accordingly.
Remove unused and redundant defines.
Use SI units where applicable.
Remove unnecessary wrapper function.
Remove redundant initialization.
Add comments where requested.
Revise event handler.
Use const where applicable.

Changes since V2:

Remove redundant adc.h include file, scheduled for removal.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoiio: core: deconstify members of struct iio_chan_spec
Michael Hennerich [Wed, 20 Jul 2011 13:03:07 +0000 (15:03 +0200)] 
iio: core: deconstify members of struct iio_chan_spec

Allow dynamic allocation and population of channel spec.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: remove unneeded include
Jonathan Cameron [Fri, 12 Aug 2011 16:56:05 +0000 (17:56 +0100)] 
staging:iio: remove unneeded include

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:events: use IIO_<TYPE> and IIO_MOD_<> instead of IIO_EV_CLASS_<TYPE> etc
Jonathan Cameron [Fri, 12 Aug 2011 16:56:04 +0000 (17:56 +0100)] 
staging:iio:events: use IIO_<TYPE> and IIO_MOD_<> instead of IIO_EV_CLASS_<TYPE> etc

The original definitions were duplicated to reduce tree churn during introduction of chan_spec
registration.  Now there is no point in maintaining the two sets of definitions.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: Introduce iio_core.h and move all core only stuff out of iio.h.
Jonathan Cameron [Fri, 12 Aug 2011 16:56:03 +0000 (17:56 +0100)] 
staging:iio: Introduce iio_core.h and move all core only stuff out of iio.h.

Also get rid of a few function defs where they are only now in one core file
anyway.
Whilst here add mask = 0 to get rid of warning.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc remove unused adc.h.
Jonathan Cameron [Fri, 12 Aug 2011 16:56:02 +0000 (17:56 +0100)] 
staging:iio:adc remove unused adc.h.

Another header unused after chan_spec conversions.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:accel remove unused accel.h header.
Jonathan Cameron [Fri, 12 Aug 2011 16:56:01 +0000 (17:56 +0100)] 
staging:iio:accel remove unused accel.h header.

The chan spec conversions and a small amount of pushdown of defines
mean this header is no longer used.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:gyro: remove gyro.h
Jonathan Cameron [Fri, 12 Aug 2011 16:56:00 +0000 (17:56 +0100)] 
staging:iio:gyro: remove gyro.h

Not longer needed now all devices with gyro channels are using
iio_chan_spec registration.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:magnetometer: remove unused header magnet.h
Jonathan Cameron [Fri, 12 Aug 2011 16:55:59 +0000 (17:55 +0100)] 
staging:iio:magnetometer: remove unused header magnet.h

Now all magnetomers are using iio_chan_spec there is no need for
the macros in magnet.h

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:magnetometer:ak8975 convert to iio_chan_spec + cleanups.
Jonathan Cameron [Fri, 12 Aug 2011 16:48:03 +0000 (17:48 +0100)] 
staging:iio:magnetometer:ak8975 convert to iio_chan_spec + cleanups.

iio_chan_spec conversion is straight forward.

Other changes:
* use i2c_smbus_write_byte_data in write_data
* c99 isms to setup various structures.
* move the comment about the scale factor and kill off trivial access func.
* make mode setting code use a bool rather than a ulong.

Ultimately I'd like to get rid of that mode bit entirely and handle it through
core pm routines, but have left it for now.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:accel:adis16220 iio_chan_spec conversion.
Jonathan Cameron [Fri, 12 Aug 2011 16:48:02 +0000 (17:48 +0100)] 
staging:iio:accel:adis16220 iio_chan_spec conversion.

I still have numerous issues with this driver and it
needs a substantial rewrite.

Whilst doing this patch at least one bug has been fixed (temp
reading didn't have an address) and a number of missing channel
info elements added.

Untested!

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:accel:adis16204: use peak_raw info_mask element + push some defs down...
Jonathan Cameron [Fri, 12 Aug 2011 16:48:01 +0000 (17:48 +0100)] 
staging:iio:accel:adis16204: use peak_raw info_mask element + push some defs down from header.

Currently this is the only driver using some of the defines in accel.h.
If these become common we'll just add them to the channel_spec options,
for now push down into this driver.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:gyro:adis16060 convert to iio_chan_spec
Jonathan Cameron [Fri, 12 Aug 2011 16:48:00 +0000 (17:48 +0100)] 
staging:iio:gyro:adis16060 convert to iio_chan_spec

Still a very odd driver. This patch has the side effect of changing
it's name slightly.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:gyro:adis16130 move to iio_chan_spec registration.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:59 +0000 (17:47 +0100)] 
staging:iio:gyro:adis16130 move to iio_chan_spec registration.

Simple conversion now we've dropped the type attributes.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:magnetometer:hmc5843 iio_chan_spec conversion.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:58 +0000 (17:47 +0100)] 
staging:iio:magnetometer:hmc5843 iio_chan_spec conversion.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:gyro:adis16080 convert to iio_chan_spec.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:57 +0000 (17:47 +0100)] 
staging:iio:gyro:adis16080 convert to iio_chan_spec.

This is a rare driver that is so simple it actually gets longer
as a result of this conversion.  Oh well, swings and roundabouts.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:gyro:adxrs450 squish some trivial single call point wrappers functions.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:56 +0000 (17:47 +0100)] 
staging:iio:gyro:adxrs450 squish some trivial single call point wrappers functions.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:gyro:adxrs450 make more use of spi_read and spi_write.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:55 +0000 (17:47 +0100)] 
staging:iio:gyro:adxrs450 make more use of spi_read and spi_write.

This needs confirmation that the devices is happy if another part is
talked to in between the request for a register and the read back.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:gyro:adxrs450 move to iio_chan_spec registration
Jonathan Cameron [Fri, 12 Aug 2011 16:47:54 +0000 (17:47 +0100)] 
staging:iio:gyro:adxrs450 move to iio_chan_spec registration

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: add quadrature correction to chan info types.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:53 +0000 (17:47 +0100)] 
staging:iio: add quadrature correction to chan info types.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:accel:kxsd9 cleanup and conversion to iio_chan_spec.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:52 +0000 (17:47 +0100)] 
staging:iio:accel:kxsd9 cleanup and conversion to iio_chan_spec.

Lots of minor bits and pieces.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: Remove deprecated dev_data from iio_dev.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:53 +0000 (17:08 +0100)] 
staging:iio: Remove deprecated dev_data from iio_dev.

The equivalent should always be done using iio_alllocate_device
with to create a private area for the driver and then iio_priv
to access it.  There may be other uses for a private data pointer
but right now it just leads driver writers astray.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:light:tsl2583 allocate chip state with iio_dev
Jonathan Cameron [Fri, 12 Aug 2011 16:08:52 +0000 (17:08 +0100)] 
staging:iio:light:tsl2583 allocate chip state with iio_dev

There are some unusual corners in the probe function of this
driver, so may need another look.

V2: Now with the check for allocation success not inverted.
V3: Now with the i2c devdata calls actually being correctly cast.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Jon Brenner <jbrenner@TAOSinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:sysfs cleanout header for unused definitions.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:51 +0000 (17:08 +0100)] 
staging:iio:sysfs cleanout header for unused definitions.

Also push one down into the only driver that actually uses it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This page took 0.045926 seconds and 5 git commands to generate.