Skip to content

Commit 159d372

Browse files
andy-shevIngo Molnar
authored andcommitted
x86/platform/intel-mid: Rename 'spidev' to 'mrfld_spidev'
The current implementation supports only Intel Merrifield platforms. Don't mess with the rest of the Intel MID family by not registering device with wrong properties. Signed-off-by: Andy Shevchenko <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 754c73c commit 159d372

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

arch/x86/platform/intel-mid/device_libs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ obj-$(subst m,y,$(CONFIG_INTEL_MID_POWER_BUTTON)) += platform_msic_power_btn.o
1515
obj-$(subst m,y,$(CONFIG_GPIO_INTEL_PMIC)) += platform_pmic_gpio.o
1616
obj-$(subst m,y,$(CONFIG_INTEL_MFLD_THERMAL)) += platform_msic_thermal.o
1717
# SPI Devices
18-
obj-$(subst m,y,$(CONFIG_SPI_SPIDEV)) += platform_spidev.o
18+
obj-$(subst m,y,$(CONFIG_SPI_SPIDEV)) += platform_mrfld_spidev.o
1919
# I2C Devices
2020
obj-$(subst m,y,$(CONFIG_SENSORS_EMC1403)) += platform_emc1403.o
2121
obj-$(subst m,y,$(CONFIG_SENSORS_LIS3LV02D)) += platform_lis331.o

arch/x86/platform/intel-mid/device_libs/platform_spidev.c renamed to arch/x86/platform/intel-mid/device_libs/platform_mrfld_spidev.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* of the License.
1212
*/
1313

14+
#include <linux/err.h>
1415
#include <linux/init.h>
1516
#include <linux/sfi.h>
1617
#include <linux/spi/pxa2xx_spi.h>
@@ -34,6 +35,9 @@ static void __init *spidev_platform_data(void *info)
3435
{
3536
struct spi_board_info *spi_info = info;
3637

38+
if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER)
39+
return ERR_PTR(-ENODEV);
40+
3741
spi_info->mode = SPI_MODE_0;
3842
spi_info->controller_data = &spidev_spi_chip;
3943

0 commit comments

Comments
 (0)