From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Link Mauve <linkmauve@linkmauve.fr>
Cc: linux-media@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil+cisco@kernel.org>,
Bradford Love <brad@nextdimension.cc>,
Kees Cook <kees@kernel.org>,
Deepanshu Kartikey <kartikey406@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] media: ts2020: put regmap_config on the stack
Date: Mon, 21 Sep 2026 20:45:49 +0200 [thread overview]
Message-ID: <arF61V7vW3EWZxG8@monoceros> (raw)
In-Reply-To: <arFixwvATR2hkp68@desktop>
[-- Attachment #1: Type: text/plain, Size: 854 bytes --]
Hello,
On Mon, Sep 21, 2026 at 07:00:55PM +0200, Link Mauve wrote:
> On Sun, Sep 20, 2026 at 09:46:42PM +0200, Uwe Kleine-König wrote:
> > If desired you can keep all the assignments here using:
> >
> > regmap_config = (typeof(regmap_config)){
> > .reg_bits = 8,
> > .val_bits = 8,
> > .lock = ts2020_regmap_lock,
> > .unlock = ts2020_regmap_unlock,
> > .lock_arg = dev,
> > };
> >
> > > + dev->regmap = regmap_init_i2c(client, ®map_config);
>
> I think I still prefer my approach, there is very little usage of the
> typeof() pattern in the kernel, the only benefit would be to keep
> lock_arg in the same location as the rest of the initial values.
If it's just the typeof you don't like, you can also use:
regmap_config = (struct regmap_config){
.reg_bits = 8,
...
};
🤷
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-09-21 18:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 11:46 [PATCH 0/3] Remove regmap_config struct from allocated data Link Mauve
2026-08-04 11:46 ` [PATCH 1/3] media: rtl2832: make regmap_config static const Link Mauve
2026-08-04 11:46 ` [PATCH 2/3] media: m88ds3103: " Link Mauve
2026-08-04 11:46 ` [PATCH 3/3] media: ts2020: put regmap_config on the stack Link Mauve
2026-09-20 19:46 ` Uwe Kleine-König
2026-09-21 17:00 ` Link Mauve
2026-09-21 18:45 ` Uwe Kleine-König [this message]
2026-09-22 8:05 ` Sakari Ailus
2026-09-20 16:31 ` [PATCH 0/3] Remove regmap_config struct from allocated data Link Mauve
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=arF61V7vW3EWZxG8@monoceros \
--to=u.kleine-koenig@baylibre.com \
--cc=brad@nextdimension.cc \
--cc=hverkuil+cisco@kernel.org \
--cc=kartikey406@gmail.com \
--cc=kees@kernel.org \
--cc=linkmauve@linkmauve.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®