openwrt/staging/blogic.git
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_ddr_pre_tuning_tx)
Toshiaki Yamane [Fri, 7 Sep 2012 04:31:04 +0000 (13:31 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_ddr_pre_tuning_tx)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_tuning_rx)
Toshiaki Yamane [Fri, 7 Sep 2012 04:30:45 +0000 (13:30 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_tuning_rx)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for any arm of this statement
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_search_final_phase)
Toshiaki Yamane [Fri, 7 Sep 2012 04:30:30 +0000 (13:30 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_search_final_phase)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for any arm of this statement
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_ddr_tuning_tx_cmd)
Toshiaki Yamane [Fri, 7 Sep 2012 04:30:16 +0000 (13:30 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_ddr_tuning_tx_cmd)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for any arm of this statement
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_sdr_tuning_tx_cmd)
Toshiaki Yamane [Fri, 7 Sep 2012 04:30:01 +0000 (13:30 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_sdr_tuning_tx_cmd)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (mmc_ddr_tunning_rx_cmd)
Toshiaki Yamane [Fri, 7 Sep 2012 04:29:46 +0000 (13:29 +0900)]
staging/rts_pstor: remove braces {} in sd.c (mmc_ddr_tunning_rx_cmd)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for any arm of this statement
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_ddr_tuning_rx_cmd)
Toshiaki Yamane [Fri, 7 Sep 2012 04:29:29 +0000 (13:29 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_ddr_tuning_rx_cmd)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_sdr_tuning_rx_cmd)
Toshiaki Yamane [Fri, 7 Sep 2012 04:29:15 +0000 (13:29 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_sdr_tuning_rx_cmd)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_switch_function)
Toshiaki Yamane [Fri, 7 Sep 2012 04:29:00 +0000 (13:29 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_switch_function)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for any arm of this statement
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_check_switch)
Toshiaki Yamane [Fri, 7 Sep 2012 04:28:44 +0000 (13:28 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_check_switch)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (downgrade_switch_mode)
Toshiaki Yamane [Fri, 7 Sep 2012 04:28:28 +0000 (13:28 +0900)]
staging/rts_pstor: remove braces {} in sd.c (downgrade_switch_mode)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_check_switch_mode)
Toshiaki Yamane [Fri, 7 Sep 2012 04:28:09 +0000 (13:28 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_check_switch_mode)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_check_spec)
Toshiaki Yamane [Fri, 7 Sep 2012 04:27:54 +0000 (13:27 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_check_spec)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_change_phase)
Toshiaki Yamane [Fri, 7 Sep 2012 04:27:38 +0000 (13:27 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_change_phase)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for any arm of this statement
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_voltage_switch)
Toshiaki Yamane [Fri, 7 Sep 2012 04:27:24 +0000 (13:27 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_voltage_switch)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_change_bank_voltage)
Toshiaki Yamane [Fri, 7 Sep 2012 04:27:08 +0000 (13:27 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_change_bank_voltage)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_wait_state_data_ready)
Toshiaki Yamane [Fri, 7 Sep 2012 04:26:35 +0000 (13:26 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_wait_state_data_ready)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_update_lock_status)
Toshiaki Yamane [Fri, 7 Sep 2012 04:26:16 +0000 (13:26 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_update_lock_status)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_select_card)
Toshiaki Yamane [Fri, 7 Sep 2012 04:25:48 +0000 (13:25 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_select_card)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_set_init_para)
Toshiaki Yamane [Fri, 7 Sep 2012 04:25:08 +0000 (13:25 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_set_init_para)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_set_clock_divider)
Toshiaki Yamane [Fri, 7 Sep 2012 04:24:26 +0000 (13:24 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_set_clock_divider)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_choose_proper_clock)
Toshiaki Yamane [Fri, 7 Sep 2012 04:24:03 +0000 (13:24 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_choose_proper_clock)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_set_sample_push_timing)
Toshiaki Yamane [Fri, 7 Sep 2012 04:23:46 +0000 (13:23 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_set_sample_push_timing)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_check_csd)
Toshiaki Yamane [Fri, 7 Sep 2012 04:23:29 +0000 (13:23 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_check_csd)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_write_data)
Toshiaki Yamane [Fri, 7 Sep 2012 04:23:09 +0000 (13:23 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_write_data)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_read_data)
Toshiaki Yamane [Fri, 7 Sep 2012 04:22:43 +0000 (13:22 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_read_data)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/rts_pstor: remove braces {} in sd.c (sd_send_cmd_get_rsp)
Toshiaki Yamane [Fri, 7 Sep 2012 04:16:27 +0000 (13:16 +0900)]
staging/rts_pstor: remove braces {} in sd.c (sd_send_cmd_get_rsp)

fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: panel: fix spinlock trylock failure on UP
Fengguang Wu [Sun, 9 Sep 2012 08:23:46 +0000 (16:23 +0800)]
Staging: panel: fix spinlock trylock failure on UP

Use spin_lock_irq() to quiet warning:

         [    8.232324] BUG: spinlock trylock failure on UP on CPU#0, reboot/85
         [    8.234138]  lock: c161c760, .magic: dead4ead, .owner: reboot/85, .owner_cpu: 0
         [    8.236132] Pid: 85, comm: reboot Not tainted 3.4.0-rc7-00656-g82163ed #5
         [    8.237965] Call Trace:
         [    8.238648]  [<c13dfd20>] ? printk+0x18/0x1a
         [    8.239827]  [<c122a5e0>] spin_dump+0x80/0xd0
         [    8.241016]  [<c122a652>] spin_bug+0x22/0x30
         [    8.242181]  [<c122a93b>] do_raw_spin_trylock+0x5b/0x70
         [    8.243611]  [<c13e8bae>] _raw_spin_trylock+0xe/0x60
         [    8.244975]  [<c1392230>] ? keypad_send_key.constprop.9+0xe0/0xe0
 ==>     [    8.246638]  [<c13922ea>] panel_scan_timer+0xba/0x570
         [    8.248019]  [<c1392230>] ? keypad_send_key.constprop.9+0xe0/0xe0
         [    8.249689]  [<c102f6f5>] run_timer_softirq+0x1e5/0x370
         [    8.251191]  [<c102f645>] ? run_timer_softirq+0x135/0x370
         [    8.252718]  [<c1392230>] ? keypad_send_key.constprop.9+0xe0/0xe0
         [    8.254462]  [<c102a592>] __do_softirq+0xc2/0x1c0
         [    8.255758]  [<c102a4d0>] ? local_bh_enable_ip+0x130/0x130
         [    8.257228]  <IRQ>  [<c102a855>] ? irq_exit+0x65/0x70
         [    8.258647]  [<c1013ff9>] ? smp_apic_timer_interrupt+0x49/0x80
         [    8.260226]  [<c13e96c1>] ? apic_timer_interrupt+0x31/0x38
         [    8.261737]  [<c12700e0>] ? drm_vm_open_locked+0x70/0xb0
         [    8.263166]  [<c122489a>] ? delay_tsc+0x1a/0x30
         [    8.264452]  [<c12248c9>] ? __delay+0x9/0x10
         [    8.265621]  [<c12248ec>] ? __const_udelay+0x1c/0x20
 ==>     [    8.266967]  [<c139136c>] ? lcd_clear_fast_p8+0x9c/0xe0
         [    8.268386]  [<c1391a66>] ? lcd_write+0x226/0x810
         [    8.269653]  [<c1367900>] ? md_set_readonly+0xc0/0xc0
         [    8.271013]  [<c122a9ed>] ? do_raw_spin_unlock+0x9d/0xe0
         [    8.272470]  [<c1392a98>] ? panel_lcd_print+0x38/0x40
         [    8.273837]  [<c1392ace>] ? panel_notify_sys+0x2e/0x60
         [    8.275224]  [<c1046634>] ? notifier_call_chain+0x84/0xb0
         [    8.276754]  [<c10469ce>] ? __blocking_notifier_call_chain+0x3e/0x60
         [    8.278576]  [<c1046a0a>] ? blocking_notifier_call_chain+0x1a/0x20
         [    8.280267]  [<c1036a14>] ? kernel_restart_prepare+0x14/0x40
         [    8.281901]  [<c1036a8e>] ? kernel_restart+0xe/0x50
         [    8.283216]  [<c1036ce9>] ? sys_reboot+0x149/0x1e0
         [    8.284532]  [<c10b3fb3>] ? handle_pte_fault+0x93/0xd70
         [    8.285956]  [<c1019e35>] ? do_page_fault+0x215/0x5e0
         [    8.287330]  [<c101a113>] ? do_page_fault+0x4f3/0x5e0
         [    8.288704]  [<c1045ac6>] ? up_read+0x16/0x30
         [    8.289890]  [<c101a113>] ? do_page_fault+0x4f3/0x5e0
         [    8.291252]  [<c10d4486>] ? iterate_supers+0x86/0xd0
         [    8.292615]  [<c122a9ed>] ? do_raw_spin_unlock+0x9d/0xe0
         [    8.294049]  [<c13e8dcd>] ? _raw_spin_unlock+0x1d/0x20
         [    8.295449]  [<c10d44ab>] ? iterate_supers+0xab/0xd0
         [    8.296795]  [<c10fb620>] ? __sync_filesystem+0xa0/0xa0
         [    8.298199]  [<c13e9b03>] ? sysenter_do_call+0x12/0x37
         [    8.306899] Restarting system.
         [    8.307747] machine restart

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: fix ccg build when NET is not enabled
Randy Dunlap [Mon, 10 Sep 2012 16:03:41 +0000 (09:03 -0700)]
staging: fix ccg build when NET is not enabled

Fix build errors in ccg when CONFIG_NET is not enabled
by adding "depends on NET":

ERROR: "netif_carrier_on" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "netif_carrier_off" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "skb_realloc_headroom" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "skb_trim" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "netif_rx" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "ethtool_op_get_link" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "free_netdev" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "register_netdev" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "skb_push" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "skb_pull" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "dev_kfree_skb_any" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "skb_queue_tail" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "__alloc_skb" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "eth_type_trans" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "eth_validate_addr" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "skb_dequeue" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "unregister_netdev" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "__netif_schedule" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "skb_put" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "eth_mac_addr" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "dev_get_stats" [drivers/staging/ccg/g_ccg.ko] undefined!
ERROR: "alloc_etherdev_mqs" [drivers/staging/ccg/g_ccg.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Cc: Mike Lockwood <lockwood@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: silicom: Force depend on module
DanielC [Tue, 11 Sep 2012 02:18:12 +0000 (19:18 -0700)]
Staging: silicom: Force depend on module

Staging: silicom: Force depend on module until monolithic build fixed

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ipack: make function tables const.
Stephen Hemminger [Mon, 10 Sep 2012 18:14:01 +0000 (11:14 -0700)]
staging: ipack: make function tables const.

Make some variables const:
  1. bus oerations table
  2. driver name
  3. tpci control register table

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: silicom: C99 cleanup of libbp_sd.h
DanielC [Sat, 8 Sep 2012 04:32:27 +0000 (21:32 -0700)]
Staging: silicom: C99 cleanup of libbp_sd.h

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: silicom: C99 cleanup of bypass.h
DanielC [Sat, 8 Sep 2012 04:31:17 +0000 (21:31 -0700)]
Staging: silicom: C99 cleanup of bypass.h

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: silicom: C99 cleanup of bp_ioctl.h
DanielC [Sat, 8 Sep 2012 04:29:14 +0000 (21:29 -0700)]
Staging: silicom: C99 cleanup of bp_ioctl.h

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: add Silicom Bypass driver
DanielC [Fri, 7 Sep 2012 02:59:06 +0000 (19:59 -0700)]
staging: add Silicom Bypass driver

The Silicom Bypass Network Interface Cards (NICs) are network cards with
paired ports (2 or 4).  The pairs either act as a "wire" allowing the
network packets to pass or insert the device in between the two ports.
When paired with the on-board hardware watchdog or other failsafe, they
provide high availability for the network in the face of software
outages or maintenance.

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6655: vt6655_init_info function must be void type
Devendra Naga [Thu, 6 Sep 2012 18:38:06 +0000 (00:08 +0530)]
staging: vt6655: vt6655_init_info function must be void type

this is because it doesn't fail anywhere and returning a value
from it will be completely unnecesary.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6655: return ENOMEM rather than ENODEV when alloc_etherdev fail
Devendra Naga [Thu, 6 Sep 2012 18:38:05 +0000 (00:08 +0530)]
staging: vt6655: return ENOMEM rather than ENODEV when alloc_etherdev fail

when alloc_etherdev fails we should be returning ENOMEM, not ENODEV

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6655: fix coding style problem at assigning netdev_ops
Devendra Naga [Thu, 6 Sep 2012 18:38:04 +0000 (00:08 +0530)]
staging: vt6655: fix coding style problem at assigning netdev_ops

we are using spaces at the beginning of the line, we should use
tabs instead

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6655: fix coding style issues in device_get_options
Devendra Naga [Thu, 6 Sep 2012 18:38:03 +0000 (00:08 +0530)]
staging: vt6655: fix coding style issues in device_get_options

a) put the device_get_options functions' opening brace below
b) replace spaces with tabs

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6655: fix coding style warnings
Devendra Naga [Thu, 6 Sep 2012 18:38:02 +0000 (00:08 +0530)]
staging: vt6655: fix coding style warnings

a) replace spaces with tabs
b) put the opening brace of get_chip_name below it

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ramster: fix build warnings
Dan Magenheimer [Thu, 6 Sep 2012 17:01:14 +0000 (10:01 -0700)]
staging: ramster: fix build warnings

Fix build warnings resulting from in-progress work that was
not entirely ifdef'd out.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tpci200: fix section mismatch warning
Stephen Hemminger [Fri, 7 Sep 2012 15:50:54 +0000 (08:50 -0700)]
staging: tpci200: fix section mismatch warning

PCI probe routines have to be named _probe to avoid section mismatch warning.
Found when doing 'make allmodconfig'

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: move the dereference below the NULL test
Wei Yongjun [Fri, 7 Sep 2012 06:59:15 +0000 (14:59 +0800)]
staging: tidspbridge: move the dereference below the NULL test

The dereference should be moved below the NULL test.

spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: convert printk's to dev_printk's
H Hartley Sweeten [Sat, 8 Sep 2012 00:50:58 +0000 (17:50 -0700)]
staging: comedi: me4000: convert printk's to dev_printk's

A lot of the messages produced by this driver are just noise and
need to be removed. For now just convert them all to dev_printk's.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove me4000.h
H Hartley Sweeten [Sat, 8 Sep 2012 00:50:39 +0000 (17:50 -0700)]
staging: comedi: me4000: remove me4000.h

Move the remaining defines in this header to the c file. Nothing
in the header is needed by any other file.

While moving the defines, reorder them so that the bit defines
are associated with the register they go with. Also, convert the
bit defines to bit shifts to make them a bit clearer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: move struct me4000_info definition
H Hartley Sweeten [Sat, 8 Sep 2012 00:50:19 +0000 (17:50 -0700)]
staging: comedi: me4000: move struct me4000_info definition

Move the struct me4000_info definition from the header to the c
file. This struct is not used by any other file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove ME4000_CNT_* defines
H Hartley Sweeten [Sat, 8 Sep 2012 00:50:01 +0000 (17:50 -0700)]
staging: comedi: me4000: remove ME4000_CNT_* defines

Since this driver is using the 8253.h helpers, these defines are
no longer needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: cleanup me4000_cnt_insn_config()
H Hartley Sweeten [Sat, 8 Sep 2012 00:49:37 +0000 (17:49 -0700)]
staging: comedi: me4000: cleanup me4000_cnt_insn_config()

Absorb the cnt_reset and cnt_config helper functions. They are
now both just single line routines.

Remove the printk noise about "Invalid instruction length".

Fix the return value, the value should be the number of data values
used to perform the instruction. The GPCT_RESET instruction only
has one parameter.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: use the 8253 helper functions
H Hartley Sweeten [Sat, 8 Sep 2012 00:49:21 +0000 (17:49 -0700)]
staging: comedi: me4000: use the 8253 helper functions

The counter subdevice of this board is a standard 8254 compatible
counter/timer. Instead of open-coding the 8254 timer io, use the
helper functions provided by 8253.h.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: add namespace to reset_board()
H Hartley Sweeten [Sat, 8 Sep 2012 00:49:05 +0000 (17:49 -0700)]
staging: comedi: me4000: add namespace to reset_board()

Rename reset_board() to me4000_reset() so it has namespace associated
with this driver. Change it's return type to void, it always succeeds.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: fix the interrupt request/free
H Hartley Sweeten [Sat, 8 Sep 2012 00:48:48 +0000 (17:48 -0700)]
staging: comedi: me4000: fix the interrupt request/free

Only set the dev->irq when the request_irq is successful.
Use the dev->board_name for the name passed to request_irq.
Change the printk messages into dev_warn().
Make sure free_irq is called in the detach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: combine the checks for valid io addresses
H Hartley Sweeten [Sat, 8 Sep 2012 00:48:26 +0000 (17:48 -0700)]
staging: comedi: me4000: combine the checks for valid io addresses

Combine the sanity checks for valid io addresses into one if().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove program_regbase from private data
H Hartley Sweeten [Sat, 8 Sep 2012 00:48:09 +0000 (17:48 -0700)]
staging: comedi: me4000: remove program_regbase from private data

The program_regbase variable in the private data is only used
when the board is first attached. This variable holds the pci
base address used to read/write the xilinx part to upload the
firmware.

Use a local variable in the xilinx_download() function to hold
this address and remove program_regbase from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: use attach_pci callback
H Hartley Sweeten [Sat, 8 Sep 2012 00:47:41 +0000 (17:47 -0700)]
staging: comedi: me4000: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: cleanup me4000_probe()
H Hartley Sweeten [Sat, 8 Sep 2012 00:47:20 +0000 (17:47 -0700)]
staging: comedi: me4000: cleanup me4000_probe()

Move the non pci probe related code out of the me4000_probe function
and back into the me4000_attach function in preparation of converting
this driver to the 'attach_pci' callback.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: store the pci_dev in the comedi_device
H Hartley Sweeten [Sat, 8 Sep 2012 00:46:51 +0000 (17:46 -0700)]
staging: comedi: me4000: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove forward declarations
H Hartley Sweeten [Sat, 8 Sep 2012 00:46:32 +0000 (17:46 -0700)]
staging: comedi: me4000: remove forward declarations

Move some of the functions to avoid the need for the forward
declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove me4000_ao_range
H Hartley Sweeten [Sat, 8 Sep 2012 00:46:12 +0000 (17:46 -0700)]
staging: comedi: me4000: remove me4000_ao_range

Use range_bipolar10, which is exported by the comedi core, instead
of creating a local symbol for an identical range.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove info macro
H Hartley Sweeten [Sat, 8 Sep 2012 00:45:56 +0000 (17:45 -0700)]
staging: comedi: me4000: remove info macro

This macro relies on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: absorb init_board_info() into its caller
H Hartley Sweeten [Sat, 8 Sep 2012 00:45:42 +0000 (17:45 -0700)]
staging: comedi: me4000: absorb init_board_info() into its caller

The init_board_info() function only gets the irq number from the
pci_dev. Just move the code into the function that calls it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: use dev->irq to save the irq number
H Hartley Sweeten [Sat, 8 Sep 2012 00:45:26 +0000 (17:45 -0700)]
staging: comedi: me4000: use dev->irq to save the irq number

Use the irq variable provided in the comedi_device to save the
irq number and remove it from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove ao context
H Hartley Sweeten [Sat, 8 Sep 2012 00:45:08 +0000 (17:45 -0700)]
staging: comedi: me4000: remove ao context

The ao context is a struct containing all the register addresses
used with the ao subdevice. These can easily be calculated when
needed. Remove the me4000_ao_context struct, its initialization
function, and it's variable in the private data.

The last value written to the ao channels still needs to be saved
in the private data for readback.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove {vendor, device}_id from the private data
H Hartley Sweeten [Sat, 8 Sep 2012 00:44:27 +0000 (17:44 -0700)]
staging: comedi: me4000: remove {vendor, device}_id from the private data

These values are never used. Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove hw_revision from the private data
H Hartley Sweeten [Sat, 8 Sep 2012 00:44:10 +0000 (17:44 -0700)]
staging: comedi: me4000: remove hw_revision from the private data

This value is read from the pci config space but it is never used.
Just remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove serial_no from the private data
H Hartley Sweeten [Sat, 8 Sep 2012 00:43:54 +0000 (17:43 -0700)]
staging: comedi: me4000: remove serial_no from the private data

This value is read from the pci config space but it is never used.
Just remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove ai context
H Hartley Sweeten [Sat, 8 Sep 2012 00:43:36 +0000 (17:43 -0700)]
staging: comedi: me4000: remove ai context

The ai context is a struct containing all the register addresses
used with the ai subdevice. These can easily be calculated when
needed. Remove the me4000_ai_context struct, its intialization
function, and it's variable in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove dio context
H Hartley Sweeten [Sat, 8 Sep 2012 00:43:21 +0000 (17:43 -0700)]
staging: comedi: me4000: remove dio context

The dio context is a struct containing all the register addresses
used with the dio subdevice. These can easily be calculated when
needed. Remove the me4000_dio_context struct, its intialization
function, and it's variable in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: use dev->iobase for the card base address
H Hartley Sweeten [Sat, 8 Sep 2012 00:43:04 +0000 (17:43 -0700)]
staging: comedi: me4000: use dev->iobase for the card base address

Use the iobase variable provided in the comedi_device for the
main base address used in the driver. Remove the me4000_regbase
variable from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove the noise when probing the card
H Hartley Sweeten [Sat, 8 Sep 2012 00:42:48 +0000 (17:42 -0700)]
staging: comedi: me4000: remove the noise when probing the card

The me4000_probe() function has a bunch of error messages that
are displayed when various parts of the probe fail. These are
just added noise. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: absorb get_registers() into its caller
H Hartley Sweeten [Sat, 8 Sep 2012 00:42:30 +0000 (17:42 -0700)]
staging: comedi: me4000: absorb get_registers() into its caller

The get_registers() function reads the pci base addresses used
in the driver. It's simple enough, just move the code into the
function that calls it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove the pci resource error messages
H Hartley Sweeten [Sat, 8 Sep 2012 00:42:12 +0000 (17:42 -0700)]
staging: comedi: me4000: remove the pci resource error messages

Remove the error messages about the pci base address not being
available. They are just noise.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: don't save the pci resource sizes
H Hartley Sweeten [Sat, 8 Sep 2012 00:41:55 +0000 (17:41 -0700)]
staging: comedi: me4000: don't save the pci resource sizes

There is no need to get the resource size for each pci bar. Nothing
in the driver uses it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove struct me4000_cnt_context
H Hartley Sweeten [Sat, 8 Sep 2012 00:41:37 +0000 (17:41 -0700)]
staging: comedi: me4000: remove struct me4000_cnt_context

The me4000_cnt_contect simply holds the unsigned long i/o addresses
used to read/write the counter registers. Thes can be calculated
as needed. Remove the struct and the associated field in the
private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: move pci vendor/device ids to source
H Hartley Sweeten [Sat, 8 Sep 2012 00:41:19 +0000 (17:41 -0700)]
staging: comedi: me4000: move pci vendor/device ids to source

Move the pci vendor/device ids from the header to the c file and
actually use them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: move struct me4000_board definition
H Hartley Sweeten [Sat, 8 Sep 2012 00:40:59 +0000 (17:40 -0700)]
staging: comedi: me4000: move struct me4000_board definition

Move the struct me4000_board definition from the header to the c file.
It's not used by any other source.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove thisboard macro
H Hartley Sweeten [Sat, 8 Sep 2012 00:40:40 +0000 (17:40 -0700)]
staging: comedi: me4000: remove thisboard macro

This macro relies on a local variable having a specific name.
Remove it and use the comedi_board() helper to get the pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove struct me4000_ao_info
H Hartley Sweeten [Sat, 8 Sep 2012 00:40:25 +0000 (17:40 -0700)]
staging: comedi: me4000: remove struct me4000_ao_info

The me4000_ao_info in the boardinfo struct is used to indicate
the number of analog output channels and a couple other details
about them. Remove the extra struct and absorb the data into the
boardinfo struct.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove struct me4000_ai_info
H Hartley Sweeten [Sat, 8 Sep 2012 00:40:06 +0000 (17:40 -0700)]
staging: comedi: me4000: remove struct me4000_ai_info

The me4000_aio_info in the boardinfo struct is used to indicate
the number of analog input channels and a couple other details
about them. Remove the extra struct and absorb the data into the
boardinfo struct.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove struct me4000_dio_info
H Hartley Sweeten [Sat, 8 Sep 2012 00:39:50 +0000 (17:39 -0700)]
staging: comedi: me4000: remove struct me4000_dio_info

The me4000_dio_info in the boardinfo struct is used to indicate
the number of 8 bit dio ports the the board has. Add a 'dio_nchan'
field to struct me4000_board and remove the struct me4000_dio_info.
The 'dio_nchan' value can then be used directly in the attach of
the board when setting the subdevice number of channels.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove struct me4000_cnt_info
H Hartley Sweeten [Sat, 8 Sep 2012 00:39:31 +0000 (17:39 -0700)]
staging: comedi: me4000: remove struct me4000_cnt_info

The me4000_cnt_info in the boardinfo struct is used to indicate
that the board has an 8254 counter. Add a 'has_counter' field
to struct me4000_board and remove the struct me4000_cnt_info.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove the '0' boardinfo data
H Hartley Sweeten [Sat, 8 Sep 2012 00:39:11 +0000 (17:39 -0700)]
staging: comedi: me4000: remove the '0' boardinfo data

Remove all the boardinfo data that is set to '0'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: convert boardinfo initialization to C99 format
H Hartley Sweeten [Sat, 8 Sep 2012 00:38:52 +0000 (17:38 -0700)]
staging: comedi: me4000: convert boardinfo initialization to C99 format

Convert the boardinfo initialization to C99 format to make it
less error prone and easier to maintain.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me4000: remove ME4000_BOARD_VERSIONS
H Hartley Sweeten [Sat, 8 Sep 2012 00:38:30 +0000 (17:38 -0700)]
staging: comedi: me4000: remove ME4000_BOARD_VERSIONS

Remove the terminating entry in the boardinfo so that ARRAY_SIZE
works correctly. Then remove ME4000_BOARD_VERSIONS and just use
ARRAY_SIZE in the probe.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/ipack: Fix bug introduced by IPack device matching
Jens Taprogge [Fri, 7 Sep 2012 08:29:19 +0000 (10:29 +0200)]
staging/ipack: Fix bug introduced by IPack device matching

~0 can not be casted to u8.  Instead of using the IPACK_ANY_ID for the format
field we introduce a new IPACK_ANY_FORMAT specifically for that field and
defined as 0xff.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ipack: only build on platforms that provide ioread/iowrite.
Jens Taprogge [Thu, 6 Sep 2012 19:45:18 +0000 (21:45 +0200)]
staging: ipack: only build on platforms that provide ioread/iowrite.

Do so by depending on HAS_IOMEM.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: vmk80xx: fix compiler warning
Greg Kroah-Hartman [Thu, 6 Sep 2012 18:21:48 +0000 (11:21 -0700)]
staging: comedi: vmk80xx: fix compiler warning

gcc complains about some potentially uninitalized variables here, yet it
can not happen, due to an enumerated type (either the board is one type
or the other.)  Make the compiler happy by providing a default case
option that makes the logic a bit simpler for it to determine that there
really isn't a problem here.

Cc: H Hartley Sweeten <hartleys@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: usbip: vhci_hcd: fixed suspend-resume loop
navin patidar [Thu, 6 Sep 2012 11:19:50 +0000 (16:49 +0530)]
staging: usbip: vhci_hcd: fixed suspend-resume loop

USB autosuspend suspends vhci_hcd. In this process hcd_bus_suspend gets
executed which puts vhci_hcd in suspend state and calls vhci_hub_status.
vhci_hub_status function checks hub state and if it is in suspend state,
usb_hcd_resume_root_hub gets executed which resumes hub and if hub is
idle, again autosuspend puts it in suspend state and this goes on.

vhci_hub_status should resume hub only when hub port is in suspend state
and hub port status has changed.

Signed-off-by: navin patidar <navinp@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: usbip: avoid deadlock in vhci_device_unlink_cleanup()
Bernard Blackham [Thu, 6 Sep 2012 10:25:04 +0000 (20:25 +1000)]
staging: usbip: avoid deadlock in vhci_device_unlink_cleanup()

Almost all of usbip assumes that the_controller->lock is acquired
before vdev->priv_lock. The exception is in
vhci_device_unlink_cleanup(), where locks are acquired in the
reverse order. This leads to occasional deadlocks.

Fixing this is a bit fiddly, as the_controller->lock can't be held
when calling usb_hcd_unlink_urb_from_ep() in the middle of the list
traversal. As I can't rule out concurrent callers to this function
(perhaps it is safe?), the code here becomes slightly uglier - when
locks are dropped in the middle so the list may have emptied itself
(not even list_for_each_entry_safe is safe here).

Signed-off-by: Bernard Blackham <b-linuxgit@largestprime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: gdm72xx: use list_move instead of list_del/list_add
Wei Yongjun [Thu, 6 Sep 2012 04:36:49 +0000 (12:36 +0800)]
staging: gdm72xx: use list_move instead of list_del/list_add

Using list_move() instead of list_del() + list_add().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: wlags49_h2: use list_move instead of list_del/list_add
Wei Yongjun [Thu, 6 Sep 2012 04:38:59 +0000 (12:38 +0800)]
staging: wlags49_h2: use list_move instead of list_del/list_add

Using list_move() instead of list_del() + list_add().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ramster: fix range checks in zcache_autocreate_pool()
Dan Carpenter [Thu, 6 Sep 2012 12:40:20 +0000 (15:40 +0300)]
staging: ramster: fix range checks in zcache_autocreate_pool()

If "pool_id" is negative then it leads to a read before the start of the
array.  If "cli_id" is out of bounds then it leads to a NULL dereference
of "cli".  GCC would have warned about that bug except that we
initialized the warning message away.

Also it's better to put the parameter names into the function
declaration in the .h file.  It serves as a kind of documentation.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: range: remove subdevice pointer math
H Hartley Sweeten [Thu, 6 Sep 2012 01:59:44 +0000 (18:59 -0700)]
staging: comedi: range: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: kcomedilib: remove subdevice pointer math
H Hartley Sweeten [Thu, 6 Sep 2012 01:59:26 +0000 (18:59 -0700)]
staging: comedi: kcomedilib: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: vmk80xx: remove subdevice pointer math
H Hartley Sweeten [Thu, 6 Sep 2012 01:59:09 +0000 (18:59 -0700)]
staging: comedi: vmk80xx: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbduxsigma: remove subdevice pointer math
H Hartley Sweeten [Thu, 6 Sep 2012 01:58:51 +0000 (18:58 -0700)]
staging: comedi: usbduxsigma: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbduxfast: remove subdevice pointer math
H Hartley Sweeten [Thu, 6 Sep 2012 01:58:32 +0000 (18:58 -0700)]
staging: comedi: usbduxfast: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbdux: remove subdevice pointer math
H Hartley Sweeten [Thu, 6 Sep 2012 01:58:15 +0000 (18:58 -0700)]
staging: comedi: usbdux: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ssv_dnp: remove subdevice pointer math
H Hartley Sweeten [Thu, 6 Sep 2012 01:57:57 +0000 (18:57 -0700)]
staging: comedi: ssv_dnp: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: skel: remove subdevice pointer math
H Hartley Sweeten [Thu, 6 Sep 2012 01:57:38 +0000 (18:57 -0700)]
staging: comedi: skel: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: serial2002: remove subdevice pointer math
H Hartley Sweeten [Thu, 6 Sep 2012 01:57:21 +0000 (18:57 -0700)]
staging: comedi: serial2002: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>