summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-04-12 19:56:27 +0100
committerMark Brown <broonie@kernel.org>2021-04-12 19:56:27 +0100
commit089cde07977cccbc6a0729485a9bee04fb86c9ea (patch)
treec860e8faccb0353a30e5982a43a0d341ef4a0661 /drivers/spi
parent6043357263fbe2df0bf0736d971ad5dce7d19dc1 (diff)
parent4a46f88681ca514f9cb33b39312d0ec4e2ec84da (diff)
Merge series "Minor updates for hisi-sfc-v3xx" from Yicong Yang <yangyicong@hisilicon.com>:
This series fix a potential interrupt race condition and cleanup the ACPI protection for the driver. Change since v1: - reword the commit in patch #2 Link: https://lore.kernel.org/linux-spi/1617881505-51552-1-git-send-email-yangyicong@hisilicon.com/ Yicong Yang (2): spi: hisi-sfc-v3xx: fix potential irq race condition spi: hisi-sfc-v3xx: drop unnecessary ACPI_PTR and related ifendif protection drivers/spi/spi-hisi-sfc-v3xx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.8.1
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-hisi-sfc-v3xx.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/spi/spi-hisi-sfc-v3xx.c b/drivers/spi/spi-hisi-sfc-v3xx.c
index 385eb7bba05a..d3a23b1c2a4c 100644
--- a/drivers/spi/spi-hisi-sfc-v3xx.c
+++ b/drivers/spi/spi-hisi-sfc-v3xx.c
@@ -5,13 +5,13 @@
// Copyright (c) 2019 HiSilicon Technologies Co., Ltd.
// Author: John Garry <john.garry@huawei.com>
-#include <linux/acpi.h>
#include <linux/bitops.h>
#include <linux/completion.h>
#include <linux/dmi.h>
#include <linux/interrupt.h>
#include <linux/iopoll.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
@@ -342,6 +342,7 @@ static int hisi_sfc_v3xx_generic_exec_op(struct hisi_sfc_v3xx_host *host,
ret = 0;
hisi_sfc_v3xx_disable_int(host);
+ synchronize_irq(host->irq);
host->completion = NULL;
} else {
ret = hisi_sfc_v3xx_wait_cmd_idle(host);
@@ -507,18 +508,16 @@ err_put_master:
return ret;
}
-#if IS_ENABLED(CONFIG_ACPI)
static const struct acpi_device_id hisi_sfc_v3xx_acpi_ids[] = {
{"HISI0341", 0},
{}
};
MODULE_DEVICE_TABLE(acpi, hisi_sfc_v3xx_acpi_ids);
-#endif
static struct platform_driver hisi_sfc_v3xx_spi_driver = {
.driver = {
.name = "hisi-sfc-v3xx",
- .acpi_match_table = ACPI_PTR(hisi_sfc_v3xx_acpi_ids),
+ .acpi_match_table = hisi_sfc_v3xx_acpi_ids,
},
.probe = hisi_sfc_v3xx_probe,
};