[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z1GtDvuJAUSNrOq6@opensource.cirrus.com>
Date: Thu, 5 Dec 2024 13:39:26 +0000
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Andrew Davis <afd@...com>
CC: Lars-Peter Clausen <lars@...afoo.de>,
        Nuno Sá
	<nuno.sa@...log.com>,
        Liam Girdwood <lgirdwood@...il.com>, Mark Brown
	<broonie@...nel.org>,
        Marek Vasut <marex@...x.de>, <patches@...nsource.cirrus.com>,
        <linux-sound@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 20/21] ASoC: wm8904: Remove use of i2c_match_id()
On Tue, Dec 03, 2024 at 02:00:00PM -0600, Andrew Davis wrote:
> The function i2c_match_id() is used to fetch the matching ID from
> the i2c_device_id table. This is often used to then retrieve the
> matching driver_data. This can be done in one step with the helper
> i2c_get_match_data().
> 
> This helper has a couple other benefits:
>  * It doesn't need the i2c_device_id passed in so we do not need
>    to have that forward declared, allowing us to remove those or
>    move the i2c_device_id table down to its more natural spot
>    with the other module info.
>  * It also checks for device match data, which allows for OF and
>    ACPI based probing. That means we do not have to manually check
>    those first and can remove those checks.
> 
> Signed-off-by: Andrew Davis <afd@...com>
> ---
Reviewed-by: Charles Keepax <ckeepax@...nsource.cirrus.com>
Thanks,
Charles
Powered by blists - more mailing lists
 
