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.

iio: frequency: ad9832: devicetree probing support

Introduce struct for device match of_device_id to avoid relying on fallback
mechanisms, which could lead to false matches against other AD9832 variants
in the future.

Suggested-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Signed-off-by: Siddharth Menon <simeddon@gmail.com>
Link: https://patch.msgid.link/20250322163211.253009-1-simeddon@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Siddharth Menon and committed by
Jonathan Cameron
0b2a4f55 ad02ca57

+8
+8
drivers/staging/iio/frequency/ad9832.c
··· 402 402 return devm_iio_device_register(&spi->dev, indio_dev); 403 403 } 404 404 405 + static const struct of_device_id ad9832_of_match[] = { 406 + { .compatible = "adi,ad9832" }, 407 + { .compatible = "adi,ad9835" }, 408 + { } 409 + }; 410 + MODULE_DEVICE_TABLE(of, ad9832_of_match); 411 + 405 412 static const struct spi_device_id ad9832_id[] = { 406 413 {"ad9832", 0}, 407 414 {"ad9835", 0}, ··· 419 412 static struct spi_driver ad9832_driver = { 420 413 .driver = { 421 414 .name = "ad9832", 415 + .of_match_table = ad9832_of_match, 422 416 }, 423 417 .probe = ad9832_probe, 424 418 .id_table = ad9832_id,