diff options
author | Fengguang Wu <fengguang.wu@intel.com> | 2014-01-16 19:13:08 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-01-16 19:11:10 -0500 |
commit | ee87c751d88f9b03fee7349556817fe80c113b32 (patch) | |
tree | 59ea70dac5853f42e6e87e45202c64833b6fabaf /arch/x86/platform | |
parent | 28c6a39b3367f29462cd586785dc445cd6b5ac23 (diff) |
x86, intel_mid: Replace memcpy with struct assignment
This is a cleanup proposed by coccinelle. It replaces memcpy with struct
assignment on intel-mid's sfi layer.
Generated by: coccinelle/misc/memcpy-assign.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Link: http://lkml.kernel.org/r/1389917588-9785-1-git-send-email-david.a.cohen@linux.intel.com
Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/platform')
-rw-r--r-- | arch/x86/platform/intel-mid/sfi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c index 438306ebed05..994c40bd7cb7 100644 --- a/arch/x86/platform/intel-mid/sfi.c +++ b/arch/x86/platform/intel-mid/sfi.c | |||
@@ -250,7 +250,7 @@ static void __init intel_scu_spi_device_register(struct spi_board_info *sdev) | |||
250 | sdev->modalias); | 250 | sdev->modalias); |
251 | return; | 251 | return; |
252 | } | 252 | } |
253 | memcpy(new_dev, sdev, sizeof(*sdev)); | 253 | *new_dev = *sdev; |
254 | 254 | ||
255 | spi_devs[spi_next_dev++] = new_dev; | 255 | spi_devs[spi_next_dev++] = new_dev; |
256 | } | 256 | } |
@@ -271,7 +271,7 @@ static void __init intel_scu_i2c_device_register(int bus, | |||
271 | idev->type); | 271 | idev->type); |
272 | return; | 272 | return; |
273 | } | 273 | } |
274 | memcpy(new_dev, idev, sizeof(*idev)); | 274 | *new_dev = *idev; |
275 | 275 | ||
276 | i2c_bus[i2c_next_dev] = bus; | 276 | i2c_bus[i2c_next_dev] = bus; |
277 | i2c_devs[i2c_next_dev++] = new_dev; | 277 | i2c_devs[i2c_next_dev++] = new_dev; |