usb: serial: baseband: buffer allocations at init
authorVinayak Pane <vpane@nvidia.com>
Wed, 21 Mar 2012 22:06:43 +0000 (15:06 -0700)
committerRohan Somvanshi <rsomvanshi@nvidia.com>
Tue, 17 Jul 2012 18:16:17 +0000 (11:16 -0700)
commit2a498649ecd1743756a42ff393cbe40795ac5180
tree4d45dfef5bf42882297043c8005a4a793829ebca
parent969361b41f95efb349da4ed7a0e8834cc9c2ab89
usb: serial: baseband: buffer allocations at init

The usb transaction buffers are allocated in module init.
In device open, close and disconnect the buffers will not be
freed. Instead they will be reused to avoid allocation failure
in low-mem conditions.

The usb driver register moved to init so that rmmod and
insmod is not required.

Bug 956211

Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/109935
(cherry picked from commit a4e8219a86f80fd06aaaae2c40a657098d5dcfa5)

Change-Id: Id88cfe3b0a75cb2e6f39176b5297f81f4f9e978b
Reviewed-on: http://git-master/r/115609
Tested-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Steve Lin <stlin@nvidia.com>
drivers/usb/serial/baseband_usb_chr.c