lkml.org 
[lkml]   [2023]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2023-10-07 18:31    [W:0.134 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site