Skip to content
Commit b5db76db authored by Mika Westerberg's avatar Mika Westerberg
Browse files

thunderbolt: Refactor add_switch() into two functions



Currently add_switch() takes a huge amount of parameters that makes it
hard to maintain. Instead of passing all those parameters we can split
the function into two parts (alloc and add) and fill the additional
switch fields directly in the functions calling those.

While there remove redundant error logging in case kmemdup() fails.

No functional changes.

Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent b433d010
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment