Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp36247pxb; Tue, 2 Mar 2021 18:14:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5Plp9VbJhjzUCGgCW1OuIeX1xJ4fEoa1fBXzpvWC/Gf0D2ZTeAg3fgE/RtEv79cbGbgxX X-Received: by 2002:a17:906:fb9b:: with SMTP id lr27mr23478137ejb.342.1614737660754; Tue, 02 Mar 2021 18:14:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614737660; cv=none; d=google.com; s=arc-20160816; b=H+RaLQ/z0liaKYwfg+1rWt8VKScH1wOIiuSy0ZSWcSwXTOj1XoJbjX5ngfqumBxJip uqAKF0cXN5gnBAZeuO9wClDTaITVsdHEz0P+5cf6erV2YmNUG+wXF7W6V3hOYvjgaegj x+MyBEuX54guMo85VkkfHGgkkD7+m1NjMwYxO2EzmJDZ3FDP1/Vohkibm+nOglX5RBop eTo9j7gtlDG11vfF+v5HNHo610wQ+crNMm+0IezjAcXR/VIR8ovY1oNQEW1iEvnmhu3M VLBJjyyUhcx1GhqzJkFPgQzZgorhKwxMsJmiCwwmW94IxUVy2VQTA35eefqAV+7zy+/h Ee1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:in-reply-to:subject :cc:to:from:user-agent:references:ironport-sdr:ironport-sdr; bh=eXGqA8cROFdL8KzL01OEuEtMcUp5t6JrrQyL6uk3WNs=; b=sVPbw1GtYLNcd9LkfMylZbKPtO4Q3FSBUHOenUDkez574q776ir7oIHOSKI/3aNT48 OnM5CDIQPKwl5uOA59iPz2C25ohicFqBtf7U3r8BwXBke3Ps2ix4a1adc3mluViOCODS /emQLX8UgsSUXDxOc1aoO/zJUEdpl+5xpVT5/fLB9QCO7G8yBZHJNETE0Fl72in3LbgP R8bxlkPNKBc4KkDMYkuoaeFfOlvIRamp9AF+W8vNApcetZtyv51i3EOGVAnBHB7b4pgP Jx8L+8vBdlMBcjrTSRHbPZ7OLGS6sMf0sq4xev07OXgGk1/okN7jNtTfDegW4Po+DxMc 9NNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ju25si8831371ejc.668.2021.03.02.18.13.58; Tue, 02 Mar 2021 18:14:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232625AbhCAKXj (ORCPT + 99 others); Mon, 1 Mar 2021 05:23:39 -0500 Received: from mga06.intel.com ([134.134.136.31]:26261 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233313AbhCAKVt (ORCPT ); Mon, 1 Mar 2021 05:21:49 -0500 IronPort-SDR: cERMtcsdVXwyqafQ2AUBEQFvaSJFC0VUbJ6N5ovHWBUYBZ0iKntvwRePKEPMfTD9av3a2JPk6P QajQMsj+916Q== X-IronPort-AV: E=McAfee;i="6000,8403,9909"; a="247828628" X-IronPort-AV: E=Sophos;i="5.81,215,1610438400"; d="scan'208";a="247828628" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2021 02:19:04 -0800 IronPort-SDR: qkiqLn92VcK9pLwqBFRZw4prmGsPifCqoo3A9wibuT20R1mnWgt5pvRUnFYtG1lvOPItd3cQRG M+keLe/OZiPw== X-IronPort-AV: E=Sophos;i="5.81,215,1610438400"; d="scan'208";a="444109927" Received: from gna-dev.igk.intel.com (HELO localhost) ([10.102.80.34]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2021 02:19:01 -0800 References: <20210216160525.5028-1-maciej.kwapulinski@linux.intel.com> <20210216160525.5028-2-maciej.kwapulinski@linux.intel.com> User-agent: mu4e 1.4.13; emacs 26.3 From: Maciej Kwapulinski To: Andy Shevchenko Cc: Greg Kroah-Hartman , Arnd Bergmann , Jonathan Corbet , Derek Kiernan , Dragan Cvetic , Linux Kernel Mailing List , Linux Documentation List , Tomasz Jankowski , Savo Novakovic , Jianxun Zhang Subject: Re: [PATCH v1 01/12] gna: add driver module In-reply-to: Date: Mon, 01 Mar 2021 11:18:59 +0100 Message-ID: <85ft1fjhws.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andy Shevchenko writes: > On Tue, Feb 16, 2021 at 6:11 PM Maciej Kwapulinski > wrote: >> .... >> +static int __init gna_drv_init(void) >> +{ >> + int ret; >> + >> + mutex_init(&gna_drv_priv.lock); >> + >> + gna_class = class_create(THIS_MODULE, "gna"); >> + if (IS_ERR(gna_class)) { >> + pr_err("class device create failed\n"); >> + return PTR_ERR(gna_class); >> + } >> + gna_class->devnode = gna_devnode; >> + >> + ret = pci_register_driver(&gna_driver); > > Is it possible to decouple a PCI glue driver from the class as many > other existing examples are doing? > I see many pci drivers (including staging) that do have it glued though. Examples are: 1. "static int __init kp2000_pcie_init(void)" (commit on May 20 09:34:11 2019) 2. "static int __init hl_init(void)" (commit on Mon Feb 18 09:46:43 2019) Please give me more details.