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 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 E61BCC43331 for ; Tue, 24 Mar 2020 10:24:26 +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 B096E208C3 for ; Tue, 24 Mar 2020 10:24:26 +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="dMiiNHGP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="n7iN2Aet" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B096E208C3 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 1jGgj3-0000YP-9Z; Tue, 24 Mar 2020 06:24:01 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jGgiz-0000YI-Od for kernelnewbies@kernelnewbies.org; Tue, 24 Mar 2020 06:23:58 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D0EC4664 for ; Tue, 24 Mar 2020 06:23:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 24 Mar 2020 06:23:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=ZULL9ixah9hyt6/LuBULZoCWGKJ 0lRudj+8mz0xQczw=; b=dMiiNHGPG6aFzN6urLe7uAqOQc11L/+mQyxYKc3gxhQ TutDRu6UadtZDGRSkudUqpOqm26JG67BxlnpIEhayjFTpAP+712jESiV+ODiYUPl fzuRPC/eWXf7zr3Oq9/vE3U+0y1lHXXJzDBBRUFgI77TkeREARWdj4Ti2qgRafAz G4eFRrLchoOkMVlU0Djy6E5EM9L0iIEGXw7pQIDLNmKYkdAc5r+XtFuSVhu4f+I/ 8XNgeVdBm2q6aXoIHGoe2aEwNlkVgKo/n3nwLDcHMSPMBKXFB2Tvwsljk4lD7wMn eRAmdPeonD8ScFTPdLjTHs95knqKcX5xNhmH71YHddQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=ZULL9i xah9hyt6/LuBULZoCWGKJ0lRudj+8mz0xQczw=; b=n7iN2AetAzszpPH4hVqBj9 qTw3FCowQxU3n10gXkwpkaERByY5HZ/iO/S8DuGptA9MAkIOSe8FANqlZfszgzdx KR/8wHgip2V+i6BoXlnAtbc/0sHdVilB0mkm/diuNAo6GTsFbhWPam+dCLZTxEbi X1rYCjoe1pfVFn6qLDrQMJVrilT53Gt/JRiUqaP55XqPk6VfeGkr6I1e9ykEzWKw 33xrnpHTVl6YEi5y8jnu8ahIfDZQHZMrLFwQsMG2NBXOJkMXvUz8/4Zwa+IuvxS9 82Js2oeC9IhDdr5amFlr5mT7LDtjnQ04/xG1ycix+T7LB5DR0TRQwLZ/4WL76hAg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehtddguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtre dttddtvdenucfhrhhomhepifhrvghgucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheq necuffhomhgrihhnpehkrhhorghhrdgtohhmnecukfhppeekfedrkeeirdekledruddtje enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgv gheskhhrohgrhhdrtghomh 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 E53C7328005E; Tue, 24 Mar 2020 06:23:50 -0400 (EDT) Date: Tue, 24 Mar 2020 11:23:49 +0100 From: Greg KH To: kernelnewbies@kernelnewbies.org Subject: Re: Accessing rpmsg_device in sysfs attribute functions Message-ID: <20200324102349.GB2220478@kroah.com> References: <117a9e9d420f444ea814a37596fe5693@tagmaster.com> <20200324063113.GA1978604@kroah.com> <20200324094946.cepooc4y4qa2luey@viti.kaiser.cx> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200324094946.cepooc4y4qa2luey@viti.kaiser.cx> 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 Tue, Mar 24, 2020 at 10:49:46AM +0100, Martin Kaiser wrote: > Hi Greg, > > Thus wrote Greg KH (greg@kroah.com): > > > That is because you have created a driver attribute, not a device > > attribute. Create device attributes and you should be fine, they bind > > to the device your driver is passed. > > could you point me to an example in the kernel tree where this is done > correctly for a platform device? > > I had a look at > > http://kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correctly/ > > but I couldn't figure out how to create device attributes in a simple > platform driver that binds to a platform device. Look at commit d99995a4f0f1 ("Input: axp20x-pek - convert driver to use dev_groups") in the 5.4 kernel as an example of how to use the correct api here. Hope this helps, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies