Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752926AbdHIPLD (ORCPT ); Wed, 9 Aug 2017 11:11:03 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:37185 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbdHIPLB (ORCPT ); Wed, 9 Aug 2017 11:11:01 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: f_hid.c conversion to the new function interface and crash due to race From: Variksla X-Mailer: iPhone Mail (14G60) In-Reply-To: <87a8399i9b.fsf@linux.intel.com> Date: Wed, 9 Aug 2017 08:10:59 -0700 Cc: bjorn@mork.no, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, jikos@kernel.org, linux-usb@vger.kernel.org, Pavel Machek , balbi@ti.com, eu@felipetonello.com, k.opasiak@samsung.com Message-Id: References: <87a8399i9b.fsf@linux.intel.com> To: Felipe Balbi Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v79FB8BP030101 Content-Length: 1173 Lines: 37 > On Aug 9, 2017, at 2:56 AM, Felipe Balbi wrote: Thanks for replying. > > > Hi, > > noman pouigt writes: >> Hello, >> >> I am currently using 3.18 linux kernel and getting below > > return -EKERNELTOOOLD; > > Sorry, you're on your own. You should ask for support from whoever > forces you to use 3.18 kernel. I have updated f_hid.c file to latest kernel though as I knew it would be too much to ask to get support for old code. I am just not sure about how to instantiate the function driver as earlier f_fs was instantiating the hid driver. However, after hid got converted to new function driver who is responsible for calling setup, bind and unbind functions in f_hid.c ? Below is the glue code in android.c. drivers/usb/gadget/android.c static struct android_usb_function hid_function = { .name = "hid", .init = hid_function_init, .cleanup = hid_function_cleanup, .bind_config = hid_function_bind_config, .attributes = hid_function_attributes, }; Is there something similar in new function driver in upstream kernel? > > -- > balbi