summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-lantiq-ssc.c
diff options
context:
space:
mode:
authorMinghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>2022-02-21 02:02:33 +0000
committerMark Brown <broonie@kernel.org>2022-02-21 13:25:19 +0000
commitc5a3106aa4923bec979c2a76667a493cb5d134fd (patch)
tree8514eb23e4f7810953f9cf1a40ff9a69d8383d4d /drivers/spi/spi-lantiq-ssc.c
parent043786303b175977e515d4e99cf6b5f886b136dc (diff)
downloadlwn-c5a3106aa4923bec979c2a76667a493cb5d134fd.tar.gz
lwn-c5a3106aa4923bec979c2a76667a493cb5d134fd.zip
spi: Use of_device_get_match_data()
Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> Link: https://lore.kernel.org/r/20220221020233.1925154-1-chi.minghao@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-lantiq-ssc.c')
-rw-r--r--drivers/spi/spi-lantiq-ssc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/spi/spi-lantiq-ssc.c b/drivers/spi/spi-lantiq-ssc.c
index bcb52601804a..aae26f62ea87 100644
--- a/drivers/spi/spi-lantiq-ssc.c
+++ b/drivers/spi/spi-lantiq-ssc.c
@@ -906,17 +906,11 @@ static int lantiq_ssc_probe(struct platform_device *pdev)
struct spi_master *master;
struct lantiq_ssc_spi *spi;
const struct lantiq_ssc_hwcfg *hwcfg;
- const struct of_device_id *match;
u32 id, supports_dma, revision;
unsigned int num_cs;
int err;
- match = of_match_device(lantiq_ssc_match, dev);
- if (!match) {
- dev_err(dev, "no device match\n");
- return -EINVAL;
- }
- hwcfg = match->data;
+ hwcfg = of_device_get_match_data(dev);
master = spi_alloc_master(dev, sizeof(struct lantiq_ssc_spi));
if (!master)