Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp708823imm; Fri, 21 Sep 2018 07:04:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbBY6oE2q/FLLiCgdTCFEDJZILz3RSCP8UCBemibRxm+R32g78ho8WLOYfBcjNlYgc8l8IQ X-Received: by 2002:a17:902:7c0a:: with SMTP id x10-v6mr44631937pll.77.1537538688097; Fri, 21 Sep 2018 07:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537538687; cv=none; d=google.com; s=arc-20160816; b=trMHxuVo6TqXNsnu31RNv3vNQfpNNmzX8LUomM8rmN+mQoRxwd5xOL5fcWaUewfVwX A7ez1ZX52pLMQw+jNGFa1ndqWqUtiVHsmfZ8R2kWVxU4Uw4dehDI1X58VS96MdOiwPqQ 23FfGHvlc53kfvi471YdwRnj//oSLqIH/TqJzh08zxeEccU+roJazfNWL9q+SVuGnJTS ldziD1+Ri6pMkLwo8FTQdYdQOoEw3oW/torulnBH/+VYnFUqCOgUVMkYCn8y+f/Zf4D6 HM1KKxZzVjwRVytdbxM3lKQGGRHTNBu9umShh1xyAwpxMmzLxSZSJOVLdYeBBs3nG9ix fRpg== 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; bh=C6UTtY+o6jp0C+8GNXjUEA87HW9F+TzFkqqYGXyjkoE=; b=SWyuG19o9ICY1ZBVJfd7T2jW4qgH9HMmKsWHIRgzL5rIrn7l+ssJsT5rPKmMY/np1v kIi0EPYvJT9CkUrgcLPPf+naG/EqgqwtaObm335AKTBwgTBVqWzVjI8RCdRIFD1FsmxI VV+DOIiErKntLpy09CGt+qZwzcsPMuD8JQbNceKOzgQ62WkIU5TIPiJODIbxh+1TA9Dd Ttkmab3TdeO8IgsOVM6T1zoWmRWc5JM3fpN1ta9rXknjmasMgmmuU7ARBxAOmSdskCm8 EcqKPwqEU9cNAZWGDPjvU1/gKmSMBZSBy3a1OtOmURxJpAO3lOfd+SP8sFPPR7yeLKbq OEag== 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 n6-v6si26066154plk.255.2018.09.21.07.04.31; Fri, 21 Sep 2018 07:04:47 -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 S2390569AbeIUTwf (ORCPT + 99 others); Fri, 21 Sep 2018 15:52:35 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:27213 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389686AbeIUTwe (ORCPT ); Fri, 21 Sep 2018 15:52:34 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w8LDx9pW022531; Fri, 21 Sep 2018 16:03:02 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2mmkmu4hg8-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 21 Sep 2018 16:03:02 +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 60EF234; Fri, 21 Sep 2018 14:03:01 +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 39678526A; Fri, 21 Sep 2018 14:03:01 +0000 (GMT) Received: from localhost (10.75.127.48) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 21 Sep 2018 16:03:00 +0200 From: Fabrice Gasnier To: , , CC: , , , , , , , , Subject: [RESEND PATCH] Revert "pwm: Set class for exported channels in sysfs" Date: Fri, 21 Sep 2018 16:02:47 +0200 Message-ID: <1537538567-5377-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.48] X-ClientProxiedBy: SFHDAG4NODE3.st.com (10.75.127.12) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-21_05:,, 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