lkml.org 
[lkml]   [2019]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] staging:iio:adc:ad7280a: add of_match_table entry
Date
On Fri, 2019-07-26 at 01:38 +0530, Kartik Kulkarni wrote:
> Add the of_device_id struct and the respective
> of_match_device entry to complete device tree support.
>

This would be a [V2] I suppose.

This change also does the rename of the driver name in a single go.
Since it's a trivial change, it's fine from my side.

Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>


> Signed-off-by: Kartik Kulkarni <kartik.koolks@gmail.com>
> Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br>
> ---
> drivers/staging/iio/adc/ad7280a.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
> index 19a5f244dcae..ded0ba093a28 100644
> --- a/drivers/staging/iio/adc/ad7280a.c
> +++ b/drivers/staging/iio/adc/ad7280a.c
> @@ -1027,9 +1027,16 @@ static const struct spi_device_id ad7280_id[] = {
> };
> MODULE_DEVICE_TABLE(spi, ad7280_id);
>
> +static const struct of_device_id ad7280_of_match[] = {
> + { .compatible = "adi,ad7280a", },
> + { }
> +};
> +MODULE_DEVICE_TABLE(of, ad7280_of_match);
> +
> static struct spi_driver ad7280_driver = {
> .driver = {
> - .name = "ad7280",
> + .name = "ad7280a",
> + .of_match_table = ad7280_of_match,
> },
> .probe = ad7280_probe,
> .id_table = ad7280_id,
\
 
 \ /
  Last update: 2019-07-26 07:32    [W:0.085 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site