Re: [PATCH 8/8] media: ov2740: remove NULL reg_write callback

From: Sakari Ailus

Date: Mon Jul 20 2026 - 05:45:51 EST


Hi,

On Wed, Jul 15, 2026 at 07:52:24PM +0200, Link Mauve wrote:
> This field is already initialized to NULL, so there is no reason to
> write it again.
>
> This prevents it from appearing while grepping for reg_write in the
> future.
>
> Signed-off-by: Link Mauve <linkmauve@xxxxxxxxxxxx>

I believe we need a real name here.

> ---
> drivers/media/i2c/ov2740.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c
> index fb590dfadda1..799eca4023da 100644
> --- a/drivers/media/i2c/ov2740.c
> +++ b/drivers/media/i2c/ov2740.c
> @@ -1271,7 +1271,6 @@ static int ov2740_register_nvmem(struct i2c_client *client,
> nvmem_config.compat = true;
> nvmem_config.base_dev = dev;
> nvmem_config.reg_read = ov2740_nvmem_read;
> - nvmem_config.reg_write = NULL;
> nvmem_config.priv = nvm;
> nvmem_config.stride = 1;
> nvmem_config.word_size = 1;

I think it'd be nicer to do the initialisation in variable declaration --
all the information is available already there.

--
Regards,

Sakari Ailus