intel: spi: fix memory allocation inside atomic context

The setup function allocates memory for chip_data structure while holding
a spin lock. Instead of using atomic memory allocation we can temporary
exit the atomic context, allocate the required memory, re-acquire the
spin lock and check if there was a race before continuing or not.

BUG=25746315

Change-Id: I89495774b3c3a5afdc3dcfa84ce9c43d0a4ea04a
Tracked-On: https://jira01.devtools.intel.com/browse/BP-25
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
Reviewed-by: Beare, Bruce J <bruce.j.beare@intel.com>
Reviewed-by: Wood, Brian J <brian.j.wood@intel.com>
1 file changed