[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB6PR05MB3223ED6CFF01AE972F608B6EA1530@DB6PR05MB3223.eurprd05.prod.outlook.com>
Date: Wed, 18 Dec 2019 15:26:23 +0000
From: Liming Sun <lsun@...lanox.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
CC: Andy Shevchenko <andy@...radead.org>,
Darren Hart <dvhart@...radead.org>,
Vadim Pasternak <vadimp@...lanox.com>,
David Woods <dwoods@...lanox.com>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] platform/mellanox: fix the mlx-bootctl sysfs
Thanks Andy for the comments. v3 has been posted with the updates.
- Liming
> -----Original Message-----
> From: Andy Shevchenko <andy.shevchenko@...il.com>
> Sent: Wednesday, December 18, 2019 8:01 AM
> To: Liming Sun <lsun@...lanox.com>
> Cc: Andy Shevchenko <andy@...radead.org>; Darren Hart <dvhart@...radead.org>; Vadim Pasternak <vadimp@...lanox.com>; David
> Woods <dwoods@...lanox.com>; Platform Driver <platform-driver-x86@...r.kernel.org>; Linux Kernel Mailing List <linux-
> kernel@...r.kernel.org>
> Subject: Re: [PATCH v2] platform/mellanox: fix the mlx-bootctl sysfs
>
> On Fri, Dec 13, 2019 at 5:21 PM Liming Sun <lsun@...lanox.com> wrote:
>
> > + ret = sysfs_create_group(&dev->kobj, &mlxbf_bootctl_group);
> > + if (ret) {
> > + dev_err(dev, "failed to create attributes, err=%d\n", ret);
> > + return ret;
> > + }
> > +
> > /* Ensure we have the UUID we expect for this service. */
> > arm_smccc_smc(MLXBF_BOOTCTL_SIP_SVC_UID, 0, 0, 0, 0, 0, 0, 0, &res);
> > guid_parse(mlxbf_bootctl_svc_uuid_str, &guid);
> > @@ -305,8 +312,16 @@ static int mlxbf_bootctl_probe(struct platform_device *pdev)
> > return 0;
> > }
> >
> > +static int mlxbf_bootctl_remove(struct platform_device *pdev)
> > +{
> > + sysfs_remove_group(&pdev->dev.kobj, &mlxbf_bootctl_group);
> > +
> > + return 0;
> > +}
> > +
> > static struct platform_driver mlxbf_bootctl_driver = {
> > .probe = mlxbf_bootctl_probe,
> > + .remove = mlxbf_bootctl_remove,
> > .driver = {
> > .name = "mlxbf-bootctl",
> > .groups = mlxbf_bootctl_groups,
>
> Please, use dev_groups member of the struct driver instead of above approach.
>
> --
> With Best Regards,
> Andy Shevchenko
Powered by blists - more mailing lists