[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023100722-stallion-unquote-a3b1@gregkh>
Date: Sat, 7 Oct 2023 18:31:00 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Miquel Raynal <miquel.raynal@...tlin.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Michael Walle <michael@...le.cc>,
Rafał Miłecki <rafal@...ecki.pl>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Robert Marko <robert.marko@...tura.hr>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Luka Perkov <luka.perkov@...tura.hr>,
Randy Dunlap <rdunlap@...radead.org>,
Chen-Yu Tsai <wenst@...omium.org>,
Daniel Golle <daniel@...rotopia.org>
Subject: Re: [PATCH v12 5/7] nvmem: core: Rework layouts to become regular
devices
On Thu, Oct 05, 2023 at 05:59:05PM +0200, Miquel Raynal wrote:
> --- a/drivers/nvmem/internals.h
> +++ b/drivers/nvmem/internals.h
> @@ -28,8 +28,30 @@ struct nvmem_device {
> nvmem_reg_read_t reg_read;
> nvmem_reg_write_t reg_write;
> struct gpio_desc *wp_gpio;
> + struct device *layout_dev;
> struct nvmem_layout *layout;
> void *priv;
> };
Wait, is this now 2 struct device in the same structure? Which one is
the "real" owner of this structure? Why is a pointer to layout_dev
needed here as a "struct device" and not a real "struct
nvmem_layout_device" or whatever it's called?
> struct nvmem_layout {
> - const char *name;
> - const struct of_device_id *of_match_table;
> + struct device *dev;
Shouldn't this be a "real" struct device and not just a pointer? If
not, what does this point to? Who owns the reference to it?
thanks,
greg k-h
Powered by blists - more mailing lists