[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgwhJkRGdduf5oYc@google.com>
Date: Tue, 15 Feb 2022 13:54:46 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Danilo Krummrich <danilokrummrich@...develop.de>
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
linus.walleij@...aro.org
Subject: Re: [PATCH 1/4] input: ps2-gpio: refactor struct ps2_gpio_data
Hi Danilo,
On Tue, Feb 15, 2022 at 05:02:05PM +0100, Danilo Krummrich wrote:
> +static inline struct ps2_gpio_data *
> +to_ps2_gpio_data(struct delayed_work *dwork)
> +{
> + struct ps2_gpio_data_tx *txd = container_of(dwork,
> + struct ps2_gpio_data_tx,
> + work);
> +
> + return container_of(txd, struct ps2_gpio_data, tx);
> +}
> +
> static void ps2_gpio_tx_work_fn(struct work_struct *work)
> {
> struct delayed_work *dwork = to_delayed_work(work);
> - struct ps2_gpio_data *drvdata = container_of(dwork,
> - struct ps2_gpio_data,
> - tx_work);
This can simply be written as:
struct ps2_gpio_data *drvdata = container_of(dwork,
struct ps2_gpio_data,
tx.work);
No need to resubmit unless you disagree - I can change it on my side.
Thanks.
--
Dmitry
Powered by blists - more mailing lists