Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp85012pxa; Mon, 3 Aug 2020 23:42:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzSyvbpssvt5ZLS6scCwHrw37Z/j5MM0zeDwZTm7LSr/6TwqLTOvfoCJTcafO2EWxERwoS X-Received: by 2002:a05:6402:508:: with SMTP id m8mr18548070edv.279.1596523364993; Mon, 03 Aug 2020 23:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596523364; cv=none; d=google.com; s=arc-20160816; b=eATurBvrPEOGkd/gEWl3Tpu83S6CTJAfh/M1bZ3BckPVME9/h9gKBgv6XlCT69r6yw YKLA6M3sd2joMeP34pTqj15x1em7QBQlz6JRN7BReFry010/Ly2Kl4MDdZeG9lJgdhsc kcPDAgifPdDMulDXdXYNAmO5eigTO0QJPTO9eBfXSt8hio2boVxr/YWWKCibOe8qmpPD 852aDdbODJHBQ8nN5Q6owesc/ibmKgomOw9+tVT4hc+jhV9WGRO2bv6/T2dyjbcteKcM Y52jNu7Da+X4zM3JJfSDdiG2j8m4KLRyHPJvrTh2DyWannGmaabgaDqqhgHmM/ard3TO rhDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=BMML83m78Ytrfa4o7kd0LqMrEhLBrYPzO3PKc7LiMI4=; b=WjXp20mhdd+SgnGuT9L1ia3o0lU/gIEuwIQGgcWcH4jK2Jm7UxeTqKKFT7qMDV0N6u L+AKLnB6W1dk+w6eG/3afdb2/LP0EmMj2r4RONKwy7KARaxsnb3Ngz+fy1FylOrInew6 oJMdlMz/U1E15Z6CD3TJvhrPpIySUUjAZiwTq/xG7IAm66OmCDko0gVT5AAjvmsBtNio bMHtU0T7zSit/r9vG8iNMiO+BFncHrEhl/2HIz/Lrs7rQBD0Wmy9MN60IT0oJ9NYSVU/ Cz3pyRbiSlIyR7uaGH4EKZC39XNPDxQotZPIcZPhMwIDWUtufQYEcPfI0DefA9itxLy6 IyCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PKyVOkf0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ox11si11452005ejb.727.2020.08.03.23.42.23; Mon, 03 Aug 2020 23:42:44 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=PKyVOkf0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727035AbgHDGl6 (ORCPT + 99 others); Tue, 4 Aug 2020 02:41:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:33180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725811AbgHDGl5 (ORCPT ); Tue, 4 Aug 2020 02:41:57 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 77C3120781; Tue, 4 Aug 2020 06:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596523317; bh=qM66h2KOjBvSnoLO4auffKSN9+voT/hyDatDYKNZHTg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PKyVOkf0vG7jeJ3DE1PWY5i3ZbA8ivcNNOimr9LceOQj3Od4237LOVFQ22OkoedxG UNBQHQ9texX162I+YL9B2+9nmyFEe0y7w0+qtFfIMkrXj3nZxB2kwRA/LP4jzTG0PW dhPlw6tKb/k4CBG59tkO5O3HHY9mR3zCz/3wcRX8= Date: Tue, 4 Aug 2020 08:41:54 +0200 From: Greg Kroah-Hartman To: Daniel Gutson Cc: Derek Kiernan , Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mika Westerberg , Arnd Bergmann , Mauro Carvalho Chehab , linux-kernel , Richard Hughes , Alex Bazhaniuk Subject: Re: [PATCH] Platform lockdown information in SYSFS Message-ID: <20200804064154.GE696690@kroah.com> References: <20200730214136.5534-1-daniel.gutson@eclypsium.com> <20200731070053.GC1518178@kroah.com> <20200731141503.GA1717752@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 03, 2020 at 07:04:56PM -0300, Daniel Gutson wrote: > > > > Think of this as an input device. You don't put the random input > > > > attributes all in one place, you create a new device that represents the > > > > input interface and register that. > > I'm having trouble with this. What's the dev_t for the child devices? > I'm doing > child_device = device_create(&my_class, &pdev->dev, MKDEV(0, 0), > NULL, "child"); > pdev is the pci_device (intel-spi-pci) > dmesg shows > > sysfs: cannot create duplicate filename '/class/my-class' > (call trace) > kobject_add_internal failed for my-class with -EEXIST, don't try > to register things with the same name in the same directory. Without seeing all of your code, I can't tell you what you are doing wrong, but the kernel should be giving you a huge hint here... Don't create duplicate names in the same subdirectory. thanks, greg k-h