Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452702
| From | "maxime.ripard@free-electrons.com" <maxime.ripard@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF |
| Date | 2016-07-30 17:30 +0200 |
| Message-ID | <s0En7-4fh-11@gated-at.bofh.it> (permalink) |
| References | <s0Dr3-3ED-11@gated-at.bofh.it> <s0Dr3-3ED-17@gated-at.bofh.it> <s0En7-4fh-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Sat, Jul 30, 2016 at 10:52:45PM +0800, Icenowy Zheng wrote:
> > + if (of_device_is_compatible(pdev->dev.of_node,
> > + "allwinner,sun6i-a31-spdif")) {
> > + host->rst = devm_reset_control_get_optional(&pdev->dev, NULL);
> > + if (IS_ERR(host->rst) && PTR_ERR(host->rst) == -EPROBE_DEFER) {
> > + ret = -EPROBE_DEFER;
> > + dev_err(&pdev->dev, "Failed to get reset: %d\n", ret);
> > + goto err_disable_apb_clk;
> > + }
> > + if (!IS_ERR(host->rst))
> > + reset_control_deassert(host->rst);
> > + }
> > +
> I think you do not need the compatible.
> You can just detect whether the reset is present.
That would weaken the error check. If we're running on the A31 and are
missing our reset property, it would go unnoticed.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] ASoC: Extended SPDIF support to Allwinner A31 SoCs codekipper@gmail.com - 2016-07-30 16:30 +0200
[PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF codekipper@gmail.com - 2016-07-30 16:30 +0200
Re: [linux-sunxi] [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF Julian Calaby <julian.calaby@gmail.com> - 2016-07-30 17:00 +0200
Re: [linux-sunxi] [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-30 17:30 +0200
Re: [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-30 17:30 +0200
Re: [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF "maxime.ripard@free-electrons.com" <maxime.ripard@free-electrons.com> - 2016-07-30 17:30 +0200
Re: [linux-sunxi] Re: [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF Chen-Yu Tsai <wens@csie.org> - 2016-08-01 15:50 +0200
[PATCH 1/2] ASoC: sunxi: Add bindings for sun6i to SPDIF codekipper@gmail.com - 2016-07-30 16:30 +0200
Re: [PATCH 1/2] ASoC: sunxi: Add bindings for sun6i to SPDIF Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-30 17:30 +0200
Re: [PATCH 1/2] ASoC: sunxi: Add bindings for sun6i to SPDIF Code Kipper <codekipper@gmail.com> - 2016-07-30 17:40 +0200
Re: [PATCH 1/2] ASoC: sunxi: Add bindings for sun6i to SPDIF Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-30 17:50 +0200
csiph-web