summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ks7010/ks7010_sdio.c
diff options
context:
space:
mode:
authorTobin C. Harding <me@tobin.cc>2017-04-27 11:25:18 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-28 11:47:26 +0200
commit11ce16da7b0f5335c7622ccc7c8151a387b44853 (patch)
treeefbd5b2156f6d4f9b19d296f7dc0b0d9eef6424e /drivers/staging/ks7010/ks7010_sdio.c
parent95e72fba95fd1d9b9ef3ab080aafe1076f42a10a (diff)
downloadop-kernel-dev-11ce16da7b0f5335c7622ccc7c8151a387b44853.zip
op-kernel-dev-11ce16da7b0f5335c7622ccc7c8151a387b44853.tar.gz
staging: ks7010: add hostif_generic_request()
Driver contains duplicate code. Host interface has numerous request functions which allocate memory for a request header. Each request header is different but all contain, as the first member, a hostif_hdr structure. This structure has size and event members which need to be set. By defining a helper function to allocate the memory and set the initial hostif_hdr members code duplication is reduced. Add function to allocate memory for a host interface request. Set 'size' and 'event' members. Remove duplicate code using newly defined function. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ks7010/ks7010_sdio.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud