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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 1A1D9C43331 for ; Tue, 24 Mar 2020 09:50:46 +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 C894820786 for ; Tue, 24 Mar 2020 09:50:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C894820786 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kaiser.cx 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 1jGgC1-0008DJ-V5; Tue, 24 Mar 2020 05:49:53 -0400 Received: from viti.kaiser.cx ([2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jGgBz-0008DC-RD for kernelnewbies@kernelnewbies.org; Tue, 24 Mar 2020 05:49:51 -0400 Received: from martin by viti.kaiser.cx with local (Exim 4.89) (envelope-from ) id 1jGgBu-0001b7-K5 for kernelnewbies@kernelnewbies.org; Tue, 24 Mar 2020 10:49:46 +0100 Date: Tue, 24 Mar 2020 10:49:46 +0100 From: Martin Kaiser To: kernelnewbies@kernelnewbies.org Subject: Re: Accessing rpmsg_device in sysfs attribute functions Message-ID: <20200324094946.cepooc4y4qa2luey@viti.kaiser.cx> Mail-Followup-To: kernelnewbies@kernelnewbies.org References: <117a9e9d420f444ea814a37596fe5693@tagmaster.com> <20200324063113.GA1978604@kroah.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200324063113.GA1978604@kroah.com> User-Agent: NeoMutt/20170113 (1.7.2) 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 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. Thanks a lot for your help, Martin _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies