cpufreq: interactive: reduce chance of zero time delta on load eval

Reschedule load sampling timer after timestamp of sample start taken,
hold spinlock across entire sequence to avoid preemption.  Avoid the
WARN for zero time delta in the load sampling timer function.

Change-Id: Idc10a756f09141decb6df92669521a1ebf0dbc10
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
cpufreq: interactive: avoid underflow on active time calculation

Check for idle time delta less than elapsed time delta, avoid
underflow computing active time.

Change-Id: I3e4c6ef1ad794eec49ed379c0c50fa727fd6ad28
Signed-off-by: Minsung Kim <ms925.kim@samsung.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
cpufreq: interactive: fix race on cpufreq TRANSITION notifier

The cpufreq TRANSTION notifier callback does not check the
governor_enabled state on affected CPUS, which will case
kernel panic in update_load because the policy object maybe
NULL or invalid when governor_enabled is false.

Change-Id: Ie0f1718124f61e2f9b5da57abc6981ada5b83908
Signed-off-by: Lianwei Wang <a22439@motorola.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
misc: uidstat: avoid create_stat() race and blockage.

* create_stat() race would lead to:
  [   58.132324] proc_dir_entry 'uid_stat/10061' already registered

* blocking kmalloc reported by sbranden
 tcp_read_sock()
  uid_stat_tcp_rcv()
    create_stat()
      kmalloc(GFP_KERNEL)

Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Added Sound Control - Francos version

add a new version that talks directly with the HSGAIN hardware register to achieve higher Headphones volume.

All the credits go to Francisco Franco

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
defconfig: enable sound control

Signed-off-by: Dan Trifan <jimsth@gmail.com>
net: wireless: bcmdhd: Fix roaming to hidden AP

Change-Id: Id64d12962049833e19705fbe109ef04b60014079
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
net: wireless: bcmdhd: Inject EID value if it has 0 length

Change-Id: Ifd102bee45e1a1e04ba015c39631a741ca74d6ee
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>