Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1337639imm; Tue, 22 May 2018 02:23:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqBIbAkOYpuCMafFb/MsOWt0IkoAnkupL2MZhuqwDR+3mX1AX11CWOO2STMHfmknQA0+sDq X-Received: by 2002:a65:5946:: with SMTP id g6-v6mr18245077pgu.391.1526980999320; Tue, 22 May 2018 02:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526980999; cv=none; d=google.com; s=arc-20160816; b=r6y2YBQrZJ0p9a0aAyHMBc4t+w2mBhFqIvo3sp7xGHqxDPKcmJvlxc+g3KHsepidvp MV0U+UB+yb/sbRF1piWvmD5Up55wqH2YUWz/nL+cyGxOnoEElbkeUI/lD2dCXxbnMOS/ FD25txp4jVzWF+9EhS/4fC0OpdciNMtD4tYfoVZ4iMDLaND2J10Pk4LBfTxjKEmwnSNq g8YIx4qEtxoblRzXCIbSFZAjmFdvuqiqebo0RNMr0t1tWzSpQafowgT2et8iC7N9M3ZW 6Hkyv+XqKvpMcXGVlXeD3bhPaVO+WQYdgFixOZ3PIYTe2RffeQxKSq2tBpOJ2VUWUTIs TI2g== 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=tp/3pyPMLzeIRcrl7OiT1bGzrUiZqvA4Q2rq/3gH6TtsEUwZfKKm6nmKUpkHJoS4oQ G4jjkX3hgbyVTHEHuReNQkZd5l0LZ2wyxqtiUsqhHfrsKLtgnVfMwzfB9teA7DeyiW0Z WiVyek7z462opsJee5nKGLYR+SoNZpltMzCvpoExcQkTn+Q+bg83VvtcjJNhYqWdI1mN GD6yx/mrCuw3Y3XSv/XbBAnSn86JJuhSMvx+ptFCFMufxlsuX5Fq9SEQxDKDKr8rVIWI UdZ0+8RCB2RXhcMnx4fTyPPlC7J4LQkrPU9aKHD5147eWolIFCmOiMWj4bDVTQdUW4rB yRYQ== 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 x14-v6si15549714pfn.41.2018.05.22.02.23.04; Tue, 22 May 2018 02:23:19 -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 S1751229AbeEVJWy (ORCPT + 99 others); Tue, 22 May 2018 05:22:54 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:57922 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751160AbeEVJWV (ORCPT ); Tue, 22 May 2018 05:22:21 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w4M9Ihcx021791; Tue, 22 May 2018 11:22:00 +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 2j2atep32f-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 22 May 2018 11:22:00 +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 ACC3B34; Tue, 22 May 2018 09:21:57 +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 8963424E8; Tue, 22 May 2018 09:21:57 +0000 (GMT) Received: from localhost (10.75.127.44) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 22 May 2018 11:21:57 +0200 From: Fabrice Gasnier To: , , CC: , , , , , , , Subject: [PATCH] Revert "pwm: Set class for exported channels in sysfs" Date: Tue, 22 May 2018 11:21:44 +0200 Message-ID: <1526980904-11041-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.44] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-22_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