lkml.org 
[lkml]   [2022]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v4 1/1] serial: core: Start managing serial controllers to enable runtime PM
* Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> [221208 09:12]:
> On Wed, 7 Dec 2022, Tony Lindgren wrote:
> > + ret = serial_core_add_one_port(drv, port);
> > + if (ret)
> > + return ret;
> > +
> > + mutex_lock(&port_mutex);
> > +
> > + /* Inititalize a serial core controller device if needed */
> > + ctrl_dev = serial_core_ctrl_find(drv, port->dev, port->ctrl_id);
> > + if (!ctrl_dev) {
> > + ctrl_dev = serial_core_ctrl_device_add(port);
> > + if (!ctrl_dev)
> > + goto err_remove_port;
> > + allocated = true;
> > + }
> > +
> > + /* Initialize a serial core port device */
> > + ret = serial_core_port_device_add(ctrl_dev, port);
>
> How is ->port_dev supposed to work here?
>
> ->port_dev is not set until in serial_core_port_device_add() but you made
> serial_core_add_one_port() call before that.

Hmm do you mean you want to call serial_core_add_one_port() later after
serial_core_port_device_add()?

Or are you seeing some uninitialized use of port->port_dev (and not
port->dev)?

Regards,

Tony

\
 
 \ /
  Last update: 2022-12-08 11:17    [W:0.181 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site