Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1299603

Re: [PATCH 1/4] spi: mediatek: merge all identical compat to mtk_common_compat

From Matthias Brugger <matthias.bgg@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] spi: mediatek: merge all identical compat to mtk_common_compat
Date 2015-12-31 09:40 +0100
Message-ID <qLGW6-25b-7@gated-at.bofh.it> (permalink)
References <qLBD4-6P9-11@gated-at.bofh.it> <qLBD4-6P9-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 31/12/15 03:59, Leilk Liu wrote:
> This patch merge all identical compat into on mtk_common_compat
> and used for all compatible soc.
>
> Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
> ---

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

>   drivers/spi/spi-mt65xx.c |   15 ++++++++++-----
>   1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
> index 563954a..3573c09 100644
> --- a/drivers/spi/spi-mt65xx.c
> +++ b/drivers/spi/spi-mt65xx.c
> @@ -95,8 +95,7 @@ struct mtk_spi {
>   	const struct mtk_spi_compatible *dev_comp;
>   };
>
> -static const struct mtk_spi_compatible mt6589_compat;
> -static const struct mtk_spi_compatible mt8135_compat;
> +static const struct mtk_spi_compatible mtk_common_compat;
>   static const struct mtk_spi_compatible mt8173_compat = {
>   	.need_pad_sel = true,
>   	.must_tx = true,
> @@ -112,9 +111,15 @@ static const struct mtk_chip_config mtk_default_chip_info = {
>   };
>
>   static const struct of_device_id mtk_spi_of_match[] = {
> -	{ .compatible = "mediatek,mt6589-spi", .data = (void *)&mt6589_compat },
> -	{ .compatible = "mediatek,mt8135-spi", .data = (void *)&mt8135_compat },
> -	{ .compatible = "mediatek,mt8173-spi", .data = (void *)&mt8173_compat },
> +	{ .compatible = "mediatek,mt6589-spi",
> +		.data = (void *)&mtk_common_compat,
> +	},
> +	{ .compatible = "mediatek,mt8135-spi",
> +		.data = (void *)&mtk_common_compat,
> +	},
> +	{ .compatible = "mediatek,mt8173-spi",
> +		.data = (void *)&mt8173_compat,
> +	},
>   	{}
>   };
>   MODULE_DEVICE_TABLE(of, mtk_spi_of_match);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] SPI: support mt2701 IC Leilk Liu <leilk.liu@mediatek.com> - 2015-12-31 04:00 +0100
  [PATCH 4/4] Document: spi: Add bindings for mediatek MT2701 soc platform Leilk Liu <leilk.liu@mediatek.com> - 2015-12-31 04:00 +0100
    Re: [PATCH 4/4] Document: spi: Add bindings for mediatek MT2701 soc  platform Mark Brown <broonie@kernel.org> - 2015-12-31 23:10 +0100
    Re: [PATCH 4/4] Document: spi: Add bindings for mediatek MT2701 soc  platform Rob Herring <robh@kernel.org> - 2015-12-31 23:20 +0100
  [PATCH 1/4] spi: mediatek: merge all identical compat to mtk_common_compat Leilk Liu <leilk.liu@mediatek.com> - 2015-12-31 04:00 +0100
    Re: [PATCH 1/4] spi: mediatek: merge all identical compat to  mtk_common_compat Matthias Brugger <matthias.bgg@gmail.com> - 2015-12-31 09:40 +0100
  [PATCH 3/4] dts: mt2701: add spi dts for mt2701 Leilk Liu <leilk.liu@mediatek.com> - 2015-12-31 04:00 +0100

csiph-web