Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2563017imm; Fri, 20 Jul 2018 00:28:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcf7sIcxMAl7KX44noVUvLDmP/tu634MzkfFR28jcMhKEBddsdS5h/7CGgFquGrXaSd7Cfa X-Received: by 2002:a17:902:8e86:: with SMTP id bg6-v6mr1017438plb.108.1532071723276; Fri, 20 Jul 2018 00:28:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532071723; cv=none; d=google.com; s=arc-20160816; b=E3CfrxnbaIpYEkJ/Elc/P4Qsq2tTclsu108YrHa5OjbCOfEp1DRTTletnJ3+xD+t4Q ZMZsUcZxFG7GNliYBSv6iXQ31jrhK+MN0ULLhGvDpEALcphcinUskGu54kOMPnAVL7Gy wXQ6QHD0m96GN6M1UZc+MDL7KfaMrDHMw+wn6XoTyN1ZbbaQRd5oQP7JWXlEackUTkQO ZPhRUlRB9/Gbrh5A82l8uKuqMNiNTyAUVcGhGBYO49id/RmmrQ6AXk3S4pLYn24vL4oF tmVlZPx0jTWrcSuh56DepbEBghimqFm6LDY/x53o12OiLOT7TZeEUIbSEzrqGYeBGDUJ laTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=C6UTtY+o6jp0C+8GNXjUEA87HW9F+TzFkqqYGXyjkoE=; b=atbBn1PG2UlPKGni5f5hDEcPod6LDbq4w8N+Xu7s1UEOkvGQtBjQffSSmaZuknkfAj gNbPR+HYVtJ4b5Dc+dycpB45BsGfFWQoUGJb/mW0LSbg3/d/XhmApZ+peVWc8FIr3sZt dfraO8itMX9f1EXn5Zs79NpkyTpGMb4leiPumUw6yEIwfgVFKyRWq4AfT+xrGgxzoBAW M2sOvU7LD3vBv1o6e/Paqbk3b0a+9ftIc8/QGW5FUrk6S9QWnNe8Sah2IBM2vXIvLaO4 Qd50LfKtvM9GMH+lK97eB+4AKxDnVhtnJVkVI1ce5Pl+3I7P8NsCkINWGSTSwN1PGuq1 CJ2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1-v6si1250954pfk.166.2018.07.20.00.28.27; Fri, 20 Jul 2018 00:28:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727243AbeGTIOp (ORCPT + 99 others); Fri, 20 Jul 2018 04:14:45 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:40783 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726779AbeGTIOp (ORCPT ); Fri, 20 Jul 2018 04:14:45 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w6K7O1fn024661; Fri, 20 Jul 2018 09:27:31 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2kasntc9mr-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 20 Jul 2018 09:27:31 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5E40234; Fri, 20 Jul 2018 07:27:30 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2A0011A41; Fri, 20 Jul 2018 07:27:30 +0000 (GMT) Received: from localhost (10.75.127.51) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 20 Jul 2018 09:27:29 +0200 From: Fabrice Gasnier To: , , CC: , , , , , , , , Subject: [RESEND PATCH] Revert "pwm: Set class for exported channels in sysfs" Date: Fri, 20 Jul 2018 09:27:25 +0200 Message-ID: <1532071645-17718-1-git-send-email-fabrice.gasnier@st.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG1NODE2.st.com (10.75.127.2) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-20_02:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 7e5d1fd75c3dde9fc10c4472b9368089d1b81d00 as it causes regression with multiple pwm chip. It creates a new entry in '/sys/class/pwm' every time a 'pwmX' is exported with 'echo X > export': - 1st time export will create an entry in /sys/class/pwm/pwmX - when another export happens on another pwmchip, it can't be created (e.g. -EEXIST) This also changes existing ABI (Documentation/ABI/testing/sysfs-class-pwm): - pmwX should be there: /sys/class/pwm/pwmchipN/pwmX Example on stm32 (stm32429i-eval) platform: $ ls /sys/class/pwm pwmchip0 pwmchip4 $ cd /sys/class/pwm/pwmchip0/ $ echo 0 > export $ ls /sys/class/pwm pwm0 pwmchip0 pwmchip4 $ cd /sys/class/pwm/pwmchip4/ $ echo 0 > export sysfs: cannot create duplicate filename '/class/pwm/pwm0' ...Exception stack follows... Signed-off-by: Fabrice Gasnier --- drivers/pwm/sysfs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c index 7c71cdb..4726d43 100644 --- a/drivers/pwm/sysfs.c +++ b/drivers/pwm/sysfs.c @@ -263,7 +263,6 @@ static int pwm_export_child(struct device *parent, struct pwm_device *pwm) export->pwm = pwm; mutex_init(&export->lock); - export->child.class = parent->class; export->child.release = pwm_export_release; export->child.parent = parent; export->child.devt = MKDEV(0, 0); -- 1.9.1