Re: [PATCH 2/2] nvmem: core: Expose cells through sysfs

From: Miquel Raynal
Date: Tue May 23 2023 - 13:14:19 EST


Hi Greg,

gregkh@xxxxxxxxxxxxxxxxxxx wrote on Tue, 23 May 2023 17:58:51 +0100:

> On Tue, May 23, 2023 at 12:02:39PM +0200, Miquel Raynal wrote:
> > +/* Cell attributes will be dynamically allocated */
> > +static struct attribute_group nvmem_cells_group = {
> > + .name = "cells",
> > +};
> > +
> > static const struct attribute_group *nvmem_dev_groups[] = {
> > &nvmem_bin_group,
> > + NULL, /* Reserved for exposing cells, if any */
>
> Please don't do this, but rather use the is_visible callback to
> determine if it should be shown or not.

Ah, excellent point. Don't know why I overlooked that member.

Thanks,
Miquèl