Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752821AbdDNIaL (ORCPT ); Fri, 14 Apr 2017 04:30:11 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34473 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751530AbdDNIaI (ORCPT ); Fri, 14 Apr 2017 04:30:08 -0400 Subject: Re: USB Type-C Port Manager API concern To: Guenter Roeck References: <20170221142405.76299-3-heikki.krogerus@linux.intel.com> <4b4bbffc-db02-3b54-04bc-e7de79b2d9ed@roeck-us.net> <07618170-d561-e7fe-08e0-91316c53d832@gmail.com> <20170303125940.GA6999@kuha.fi.intel.com> <6ddb2eac-03d5-127e-df1e-ad189968e6b2@gmail.com> <20170306131442.GC6999@kuha.fi.intel.com> <696552a7-c36a-1d73-9517-543907e9da39@gmail.com> <9b32fabf-3ff5-112f-4249-a7024f808b20@roeck-us.net> <4fe455d8-30d9-0c21-46aa-6d273cd24d50@gmail.com> <20170409151614.GA23984@roeck-us.net> <949bc063-7002-c12c-ba56-8b46f9ea178b@gmail.com> Cc: Heikki Krogerus , Greg KH , Felipe Balbi , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org From: Mats Karrman Message-ID: <0a00a8a0-7955-559e-817e-72781908dd72@gmail.com> Date: Fri, 14 Apr 2017 10:30:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 444 Lines: 9 On 04/14/2017 04:57 AM, Guenter Roeck wrote: > ... Overall I think there is an assumption in any API that any > callback functions provided in a registration call can immediately be > called. Otherwise any API would be in trouble. Can you modify your > code to not require the port pointer in its callback functions ? Yes, I have deferred my calls until after the registration function has returned which seems only logical. Thanks, Mats