Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: cesa - Simplify with of_device_get_match_data()

Driver's probe function matches against driver's of_device_id table,
where each entry has non-NULL match data, so of_match_node() can be
simplified with of_device_get_match_data().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Krzysztof Kozlowski and committed by
Herbert Xu
054c7f7a 4ae946a4

+2 -5
+2 -5
drivers/crypto/marvell/cesa/cesa.c
··· 420 420 { 421 421 const struct mv_cesa_caps *caps = &orion_caps; 422 422 const struct mbus_dram_target_info *dram; 423 - const struct of_device_id *match; 424 423 struct device *dev = &pdev->dev; 425 424 struct mv_cesa_dev *cesa; 426 425 struct mv_cesa_engine *engines; ··· 432 433 } 433 434 434 435 if (dev->of_node) { 435 - match = of_match_node(mv_cesa_of_match_table, dev->of_node); 436 - if (!match || !match->data) 436 + caps = of_device_get_match_data(dev); 437 + if (!caps) 437 438 return -ENOTSUPP; 438 - 439 - caps = match->data; 440 439 } 441 440 442 441 cesa = devm_kzalloc(dev, sizeof(*cesa), GFP_KERNEL);