Messages in this thread |  | | Date | Mon, 24 Feb 2014 20:42:59 +0100 | From | Sebastian Reichel <> | Subject | Re: [PATCHv1 5/6] HSI: Introduce OMAP SSI driver |
| |
On Mon, Feb 24, 2014 at 09:56:51AM -0600, Nishanth Menon wrote: > On 02/24/2014 09:51 AM, Mark Rutland wrote: > > On Sun, Feb 23, 2014 at 11:50:00PM +0000, Sebastian Reichel wrote: > > [...] > >> +static int omap_ssi_port_runtime_suspend(struct device *dev) > >> +{ > >> + struct hsi_port *port = dev_get_drvdata(dev); > >> + struct omap_ssi_port *omap_port = hsi_port_drvdata(port); > >> + struct hsi_controller *ssi = to_hsi_controller(port->device.parent); > >> + struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); > >> + > >> + dev_dbg(dev, "port runtime suspend!\n"); > >> + > >> + ssi_set_port_mode(omap_port, SSI_MODE_SLEEP); > >> + if (omap_ssi->get_loss) > >> + omap_port->loss_count = > >> + (*omap_ssi->get_loss)(ssi->device.parent); > > > > You don't need to do (*struct->func)(args) when invoking a function > > pointer. You can jsut have struct->func(args) as we do elsewhere. This > > can be: > > > > omap_ssi->get_loss(ssi->device.parent) > > > > This should be fixed up in the other sites too. > > in fact, we should stop expecting that service and drivers should > manage their own context_loss detection > Examples: > MMC: > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0a82e06e6183a252608df48cc4793b83e2d73dfd > > DSS: http://marc.info/?l=linux-omap&m=139272358619064&w=2
I'm currently initializing get_loss as NULL, so context loss detection is currently disabled. I will try to find a way to detect context loss once the n900 modem is in a working state in the mainline kernel.
For now I will keep the get_loss() with the changes requested by Mark.
-- Sebastian [unhandled content-type:application/pgp-signature] |  |