From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69324C4332B for ; Sun, 22 Mar 2020 16:34:54 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 17A4F20724 for ; Sun, 22 Mar 2020 16:34:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="YGssuWtZ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="1YQ/4OHS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 17A4F20724 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1jG3Yd-0006g2-3j; Sun, 22 Mar 2020 12:34:39 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jG3Yb-0006fw-6g for kernelnewbies@kernelnewbies.org; Sun, 22 Mar 2020 12:34:37 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 56F6F5C00D8; Sun, 22 Mar 2020 12:34:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 22 Mar 2020 12:34:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=jBsJeTp2Ovt65Ea5LfIbKyB0eFE xMiO/i3P3L2rb/58=; b=YGssuWtZ4MoFHdpEw0fKJVz8rsYc0FmdfTBB1NzFhrC k5ezXbJPaV4Hyg65PCHc0eAgXwqf63Fv9+ipde+QaKt/g8JgvzvqBTZ+J8zWJs3d tzsRkz0lgI6w3ahPJ+29yKsmhthpnHyET7QALz8rBrvcqQ72CW/fCdULpWKfkXSI +hb3mVm8hGMDziJgbzCMM4ziDFahB2xyOWa9d0lzr1nauZuzKrs4WYAGEbSXPJsi 1Jas5SrLme+kl6ENyGAuy8Iaq+KSE0ymIi+6tHunAtgNSVM1DlbTORjPASSXu8lX phFyE71dtbSS98QpTK41ggxH4aFJDTw3xvoTzy8RtRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=jBsJeT p2Ovt65Ea5LfIbKyB0eFExMiO/i3P3L2rb/58=; b=1YQ/4OHSq4izvUYmSN3zCM OEWdv8joycCA+fUy5HMZc+15WgVUry2Qa4GbdbCD20L3dPjUKzYih0ac5/u9nKUj Ts2pLXFfGvUPJMu1+jQoMGTmSJgdAN6GMDX3DS2h7jBik0XhZ+9fVP1b5XPg/k2C TxhBlbmSzVuj1KfWlzIenhf/nMCEK8DKIB9Oe3dLbwLb1dJg0T2ziGxSa9DJ4amR 7AUVy5ASII16DSVqriLvpJm6SrWle4ggXvmY2PrrykoPT09/M/sFwVl1nL+XfWil 1J2ZSSMa/lHmJSzCmZN8Pmjiuos+sJIMkOt4GAJYFeDb4RjWdvQsKS5VMb7vKmqQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudegiedgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucfkphepkeefrdekiedrkeelrddutd ejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhr vghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id B68B33280064; Sun, 22 Mar 2020 12:34:33 -0400 (EDT) Date: Sun, 22 Mar 2020 17:34:32 +0100 From: Greg KH To: Tomek The Messenger Subject: Re: can kernel platform driver name be different than module name? Message-ID: <20200322163432.GA96331@kroah.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Sun, Mar 22, 2020 at 05:26:09PM +0100, Tomek The Messenger wrote: > I suppose the response is yes but I would like to make sure: > Is below acceptable: > some_module_name.c: > #define DRIVER_NAME "some-driver-name" > ... > static struct platform_driver some_driver = { > .driver = { > .name = DRIVER_NAME, > .of_match_table = of_match_ptr(some_of_match), > }, > > vs > > Makefile: > SRC := $(shell pwd) > obj-m += some_module_name.o > some_module_name-m := directoryInWhichThereIsUsFile/ some_module_name.o > all: > $(MAKE) -C $(KERNEL_SRC) M=$(SRC) > modules_install: > $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install Sure, name it what ever you want, driver names only have to be unique to the type of driver registered, while module names have to be unique to all kernel module names. hope this helps, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies