Re: [PATCH v3 1/1] platform/chrome: Poke kb_wake_angle attribute visibility when needed

From: Tzung-Bi Shih
Date: Thu Nov 17 2022 - 21:01:25 EST


On Wed, Nov 16, 2022 at 10:23:38AM -0800, Gwendal Grignou wrote:
> [+chrome-platform@xxxxxxxxxxxxxxx]

Please also Cc to the mailing list if the patch gets chance to have
next version.

> On Mon, Nov 14, 2022 at 8:10 PM Gwendal Grignou <gwendal@xxxxxxxxxxxx> wrote:
[...]
> > > Expose the attribute group to alter to close a potiential race between
> > > cros-ec-sensorhub and cros-ec-sysfs (that creates the attribute group
> > > on behalf of the class driver).

I failed to realize the potential race. Could you explain it a bit?

> > > diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/platform_data/cros_ec_proto.h
> > > index 02599687770c5..c6dca260bbd5d 100644
> > > --- a/include/linux/platform_data/cros_ec_proto.h
> > > +++ b/include/linux/platform_data/cros_ec_proto.h
> > > @@ -191,6 +191,7 @@ struct cros_ec_platform {
> > > /**
> > > * struct cros_ec_dev - ChromeOS EC device entry point.
> > > * @class_dev: Device structure used in sysfs.
> > > + * @groups: sysfs attributes groups for this EC.

The field name has extra "s".