From patchwork Mon Dec 2 09:50:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180556 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4969032ile; Mon, 2 Dec 2019 01:50:32 -0800 (PST) X-Google-Smtp-Source: APXvYqyAR+1vwqiNd3qo5z0FD475IMBWjpSs9N2jkTBx6vM8PBCZXg6yS6+YRgRcvP6XHLPasvEy X-Received: by 2002:a05:6402:17c6:: with SMTP id s6mr57380984edy.22.1575280232028; Mon, 02 Dec 2019 01:50:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575280232; cv=none; d=google.com; s=arc-20160816; b=UydOfeJ+gILmmVRydPP6ZtQrAY/JJlMaPeja7YOUwWsf9hIYuv9Zx0CsuTU8UZKJz9 JP6ASc1y/5/5OlbmQeOrZG8ejwbn0fXHI4t5w4UE6eXE3n2DBPvJ23R1I8ZBStbvLdTE k3UFqKeu+cM6y90Klst86Z6e90Qe2iW8jYR2H7Erh5NT0VzvhuA2A7a+XZIBuNdr9aM0 FgIBsjfjIMwThJ8Wkp+gH2tnJQF3M6EY2hrIX7CTAAGsv7y9BDOsaDXg3cj+Qk0TpOt8 +RxJhU5pOc2hbSrPxVegMjkUGi9nkUjBHf/4WYOGsbZp7Rx48FLexsZxGlS76WDyv5aE aMug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=hCYfmL1/wCJrAvT+ACq87WMwGG7+rMaHvrzSdRlqSHM=; b=tGPM9KNZddAy0VCXmBdWEk2Vct5o9olnfbud6hnYml1EpHRUBVFNpcr4lniI2z6O+L 1Rkt5Ld2jeW2+WkLf5kLYDFA9OmXmvGpA5UdTB9clOpQst0tk68I5SKzDh/vJvXY/gpz AheYHZS+HAFyGDGPQ+1LYf/BhTEm9Y/M9qMZkQ9g2JE5JUlGBW4Bg0MjVOKfPBSy7Fex Go2MRmN1MfnC4hwcdIGrtCWIL4X58BUwLdTyxeBQyekUfpOFi13e6hk00gZB/jPBMpsM J/eEanKGVZID1rmKENx3rTs2Vl3g6ZCIZstfyFppmWLe/DptjQUKvF0v92C1Fy6w7AkL dkag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UGO2zcWW; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j29si22786482edj.327.2019.12.02.01.50.31; Mon, 02 Dec 2019 01:50:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UGO2zcWW; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726254AbfLBJub (ORCPT + 15 others); Mon, 2 Dec 2019 04:50:31 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46747 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726251AbfLBJua (ORCPT ); Mon, 2 Dec 2019 04:50:30 -0500 Received: by mail-wr1-f65.google.com with SMTP id z7so39876151wrl.13 for ; Mon, 02 Dec 2019 01:50:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=hCYfmL1/wCJrAvT+ACq87WMwGG7+rMaHvrzSdRlqSHM=; b=UGO2zcWWellV0haG6MUkR0NEECD4K4a5Ng0g8G1HjRGFICqwAKrxAqGPCciTv2Zjf0 ZoUjajmiS60wSU1b3Y8+LwSq+WknsDj9l2b44E5S2DGtvRPrcj0jT6D+65iDbwdGsx0W I0/zkrOW43P3MF2vxUtfDtZDsEXoKC7TxS2bucorGbtr5S7D0hOQieaBh5zFNUgeF2K2 paDlhDzr3o0n1drRR9ZELN1cJ0iauSb6WH7ZJkgqhN1f/SWXds4dwUarOy1wBgs10aXg 5+LYJV4aY+srPY7zlwuwv3KH1dKwf9OheJNxuRWLDESDgaXf9Kw9okXZFh2k2WRHt4nA CYCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=hCYfmL1/wCJrAvT+ACq87WMwGG7+rMaHvrzSdRlqSHM=; b=PYZZjuWJXdGlJyacKLVkmL6xIvKcrV6HPB7aJSQLq0WmwEVdzyoPJqOpAMgbpjgTkA bZ4CAUyfNI6t4VuHkRLn0Gu+Xd24kyOZObNKWKVGexkT0G2S4WYN6vJpxgWUMzxgK7eL 7/Fq5+5B+az9sqsRs7/baZJZWesPKUBCRR0mLP5fN3qi7WJryX9dLV42FVZ2Bpswgv1i N1bw2j9Vta7hKhX7dRD246u8x/wEwgSKg7DpoGIQ5FVNvj2lEQ5ksfez6M0Ef46amdsV GE1/S/3nD916ofRguqF6nKjQ8y5zgV5sjzpW1OGvfadD5J0M0IZWw5msJX6oQYp2Us9k E8Rw== X-Gm-Message-State: APjAAAVzo4B0hLJPbBubUQMF8Eho1hgypZSjuQOIPc1amg7X7kIHGZ/k SgHPav98YE7xtf57jifECmsZ/u7rUr4= X-Received: by 2002:a5d:4d4a:: with SMTP id a10mr60894710wru.220.1575280228650; Mon, 02 Dec 2019 01:50:28 -0800 (PST) Received: from localhost.localdomain ([2.27.35.155]) by smtp.gmail.com with ESMTPSA id l3sm4629698wrt.29.2019.12.02.01.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 01:50:28 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.9 1/6] clk: at91: fix update bit maps on CFG_MOR write Date: Mon, 2 Dec 2019 09:50:07 +0000 Message-Id: <20191202095012.559-1-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Eugen Hristev [ Upstream commit 263eaf8f172d9f44e15d6aca85fe40ec18d2c477 ] The regmap update bits call was not selecting the proper mask, considering the bits which was updating. Update the mask from call to also include OSCBYPASS. Removed MOSCEN which was not updated. Fixes: 1bdf02326b71 ("clk: at91: make use of syscon/regmap internally") Signed-off-by: Eugen Hristev Link: https://lkml.kernel.org/r/1568042692-11784-1-git-send-email-eugen.hristev@microchip.com Acked-by: Alexandre Belloni Reviewed-by: Claudiu Beznea Signed-off-by: Stephen Boyd Signed-off-by: Lee Jones --- drivers/clk/at91/clk-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.24.0 diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c index 2f97a843d6d6..b29bc7ec2ef9 100644 --- a/drivers/clk/at91/clk-main.c +++ b/drivers/clk/at91/clk-main.c @@ -162,7 +162,7 @@ at91_clk_register_main_osc(struct regmap *regmap, if (bypass) regmap_update_bits(regmap, AT91_CKGR_MOR, MOR_KEY_MASK | - AT91_PMC_MOSCEN, + AT91_PMC_OSCBYPASS, AT91_PMC_OSCBYPASS | AT91_PMC_KEY); hw = &osc->hw; From patchwork Mon Dec 2 09:50:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180558 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4969084ile; Mon, 2 Dec 2019 01:50:35 -0800 (PST) X-Google-Smtp-Source: APXvYqxM48oacyFLMLpsmJ0HU6u7Ggb/4i6N9IBS8CH7mI1LrnLASn006Z3H1J/fyQlLP2rNnoT1 X-Received: by 2002:a17:906:604e:: with SMTP id p14mr78393962ejj.257.1575280235242; Mon, 02 Dec 2019 01:50:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575280235; cv=none; d=google.com; s=arc-20160816; b=qi5vdsCNGb2s0OH+gA+TI0Wu4LhEFjD+zsiwK+7lKptRu700nhl34QxI2w5mGqfPo9 Hl2V418FfuozQ0Sec3pw/epCTXe2EjRARq98bi4jxpLImHtdOSnT/+dcvMn3ySk1jXMn LxYs7cX3iXVXtOJfd9epZXpdx2sbXtdLDNIVlpkkFWrBxZIcfN3aQ4IhHggPWiSDlW43 mtXaijZAhmqeAknu7G544jHRbJbrPkUe9vIe+av9oE3/fpPSx9sDK09z81cynKw9dMWQ ZQBIGkKjjIjJIXPQRP2FvG0aA+J7//5troku8mxub2Qs+fRdGlZOCh0/5ChP1rEzIV0E M86w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=/muS7s9GcBWwOiQ2nT4NrXkQLoaaxRJ0Am/sFjK2n1M=; b=Ws9M8NPWKKFCFwrr3+zBd4Oh3eqKN04NibbJUzoALnr3bRLCN0IyPTUBBv8Ch8BcFm +QRW9mlQLYwIm1+cFWbuJW1k6TotPMF8YNBh/0SRr92IzkMl+bleF1UdkoWUYQvvR471 sbfGuw7Ce+QjMMg/yoS5C+gtKPTyN4wugy/QPCqzPNB8DRgr8Of3H9k4XPZPBcLhGl/W BjJvHYQXgr2VEN8OZJsee6I2GVFZPphkiXmyFqPOCxY7dg++87vFnBSb7yQbHzXToWRo 6dRS0dO9q+QkwfFrXuLZWtJBUy88kS4777xM86NHrHfkoZfKZS4tHUYiphhtWXA70814 NpOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="V/lZvx6f"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j29si22786482edj.327.2019.12.02.01.50.35; Mon, 02 Dec 2019 01:50:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="V/lZvx6f"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726251AbfLBJue (ORCPT + 15 others); Mon, 2 Dec 2019 04:50:34 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43612 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbfLBJue (ORCPT ); Mon, 2 Dec 2019 04:50:34 -0500 Received: by mail-wr1-f65.google.com with SMTP id n1so43370802wra.10 for ; Mon, 02 Dec 2019 01:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=/muS7s9GcBWwOiQ2nT4NrXkQLoaaxRJ0Am/sFjK2n1M=; b=V/lZvx6f6F9UM+nPQihXQJR8mZqDE4wggRiB6PXai3RWE/cS7t7Nt/lejvngIUxqyy HKdq4pKYAk0o6xNRt6LCazEZToaB7cytOQW6FdykXAMod1jSyKKZIvzKM5RjB8p4SudS yCEZtjpe1dFkzO+9ygez17VJq91s4ksMayYny119cF31rNYVuSvSIDodg5hJWYPv2jRB +QnRk0AIjajJfqLWxvkCjreqUs1vJkqDLJ4ypizP98IIDd4ueHsjC5ekCcM0b28LX4sP ys47Qu2devSayhUW/SbpU9/L1j0y8OIyKMGgktSsrjpujGlcGYKsY41RrjpCsopXttTj AofA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/muS7s9GcBWwOiQ2nT4NrXkQLoaaxRJ0Am/sFjK2n1M=; b=q4e/ktyIydt5/ATcmd9WklCC6DxcpbFt9BBeVUWp5FUf7VRq4zAX6MILvBVNBxNEBw KvyPTYoH/Zo1+gC22ymKnOKeI6jgDIDASZKafODW0zurYpxRir0Y0oyIlOTU3FgFC0Ht C3/yN+KGOfFH3qG1KtrXj187px3fLCqK40mzFOsIneVnVlyTo06RyAY48s1Nw6GAeDbP NzXFmOSDXI6z6kKkYjzliQFpweFMdfaAQAzjyzHj8Uj2mbI7KOzRqvM2IKEbLgM4T3ap uUP4CDZ5CONpW+qQVRbNv9Qw9rS2HPraukOFDotu5xYBOi7ERQ/1mHKPK7zN56BYVwfq uFqA== X-Gm-Message-State: APjAAAXYhGpppTNPrw4tadnZakABw/6nE+uDlEnWDy+euSZPgUREz4Nz cy/+5a/4WA+cFsPAawoix7jcKkcpMv0= X-Received: by 2002:a5d:4281:: with SMTP id k1mr31389590wrq.72.1575280230588; Mon, 02 Dec 2019 01:50:30 -0800 (PST) Received: from localhost.localdomain ([2.27.35.155]) by smtp.gmail.com with ESMTPSA id l3sm4629698wrt.29.2019.12.02.01.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 01:50:30 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.9 2/6] arm: add missing include platform-data/atmel.h Date: Mon, 2 Dec 2019 09:50:08 +0000 Message-Id: <20191202095012.559-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191202095012.559-1-lee.jones@linaro.org> References: <20191202095012.559-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Philippe Mazenauer [ Upstream commit 95701b1c3c8fe36368361394e3950094eece4723 ] Include corresponding headerfile for function at91_suspend_entering_slow_clock(). ../arch/arm/mach-at91/pm.c:279:5: warning: no previous prototype for ‘at91_suspend_entering_slow_clock’ [-Wmissing-prototypes] int at91_suspend_entering_slow_clock(void) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Philippe Mazenauer Signed-off-by: Alexandre Belloni Signed-off-by: Lee Jones --- arch/arm/mach-at91/pm.c | 1 + 1 file changed, 1 insertion(+) -- 2.24.0 diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 8ba0e2e5ad97..3091c3817d9d 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include From patchwork Mon Dec 2 09:50:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180557 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4969076ile; Mon, 2 Dec 2019 01:50:34 -0800 (PST) X-Google-Smtp-Source: APXvYqyjVWRXNV/BtgeasHqdcR9NhfUS5SWPeiQz6NgDgDi5o4tEYytYN/WLSQa6vR0JjJrZ2yNr X-Received: by 2002:a17:906:1356:: with SMTP id x22mr3560768ejb.55.1575280234822; Mon, 02 Dec 2019 01:50:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575280234; cv=none; d=google.com; s=arc-20160816; b=G/3BnGqq6tAPW8FTNOfeOMQhgPjFzkASsuUagQuNBoz6VWq9Vfzo4EoWNOSI/H+yOQ 7h7dPGwYhYHKgpb+Zcm4N4RPAGVVpDPh5R08E+7lL2DZNtpLok29fJ05IooaeX7teMek SqQ20fnq9F2Pq1HhOZ3sDu6Oy/j/TuYE6Tj477MTTupQkoi3ayMVyZwVvM4pBLnZWAsF QvCvd1UwZTXvo6XlyVFXoCWBhYua42Fs0515m39ZZfo28AHupWFUq21WgxENlaBq7Xzt Av0D1jJGlKnAG6ZBxkThmRW0b2tA2iIYAkZGO+ts6qSWUnclZ39sy8v0pWr+q4JNq3eL +y4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=4lRCZtScqteiIwqRIQPonN0lIzT2Jm1cQmQMPHaZrMc=; b=NmVEVcCKTCxtCMybmNN8LpViukSVQegcPi3f5OGWaE2So5fD9rkPSY/YepyY6UzjHQ AmBV7DCLR3Dmqy8YDRJKtzRi1a8UgbZt2FdhYwwPFWip2tdnOx3wDzcRN1poPwKaQKoq WuLO52VFEysVCkNC0ONK1VZ3Vb7bzRsp94x/9qhpF4aPDfJZIRnP2VC2QDi51tQwMQpm Md0bMnm+20yGid24fWhGkjYifosQS2D9OCNCLg+noYZl487F3MiDa4QXSulcZP6m8Y3/ mLmKTV6lprxTu12ybStJKPVgNjNAmC/VFpQA0wbHHC4kyOG48nU6LQSjrOu9sKpigo8G x4Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=llK2OT1O; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j29si22786482edj.327.2019.12.02.01.50.34; Mon, 02 Dec 2019 01:50:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=llK2OT1O; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726410AbfLBJue (ORCPT + 15 others); Mon, 2 Dec 2019 04:50:34 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43618 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726251AbfLBJue (ORCPT ); Mon, 2 Dec 2019 04:50:34 -0500 Received: by mail-wr1-f68.google.com with SMTP id n1so43370871wra.10 for ; Mon, 02 Dec 2019 01:50:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=4lRCZtScqteiIwqRIQPonN0lIzT2Jm1cQmQMPHaZrMc=; b=llK2OT1OgLdYuLs5HW53tdeXYmiKXBkqiOSq4cossCqWa74lkLTRq7oM7LqK8IsCjo 2RHVH/B4l/9cmzHsBzV4TRI64Idg6whdVmU8+CswrlWsHuB0rBO31+lFkTsunnCQVJ30 26Xlwv4PBt5tjX49nNop9xLzpcLv0bwrkYw3GqeLJKtnBnKZhxgpdvJIOpNbN8EbCZc1 56AU23rQ4gwdH9K3/4g8YtOImBM30Yx304Y9XvFyxII6L3ToGsW3THkMnnme3JxgNbwl 2X/AwD+PYACjzQnh93P4XyQFOdaCXsznM4f8AtOjTY1D5Q6zBzWo33efQgXozaS5tMW/ uncw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4lRCZtScqteiIwqRIQPonN0lIzT2Jm1cQmQMPHaZrMc=; b=DWtdOBLT4j0PPfPkRhJ1LiE5xIzLatS1bgQ+5q2ipFoB0OBo8QHr/tscb2z47Zv4fs tXDJ3JQu2Ucyn5okH/MnCwv9WViJLJQvX1JHNp9MblWetlVt4k+MW6S+AJvUFtEEv9mK 4chsVB9BJDVWe+Jyc8hAW4rslwPXxTp/sMCZ2wMG2hSJw/okVEDV9uB+bxExeBc4Uy2s nVfdheLR8HHTvad+WwfwJkIWJvNxrV9+sLwDdZ7fJ+h9smaaqSmeUl5UXpEzAhzPA4N6 xLLJktqsqHFj6ODraEmQATpl1iI5hGMtivCHK27KM6vJWnDHqalx2ZyCizT4ciDU7QHI CVsQ== X-Gm-Message-State: APjAAAWqK75vfsHU9loAxEC5JxRdcOKpxrsGI/HInWVE8+8DljGX7k9V bGiSGvHJxIcHZ1FQKoUuENoJG8RT+MU= X-Received: by 2002:a5d:6089:: with SMTP id w9mr22192260wrt.228.1575280231742; Mon, 02 Dec 2019 01:50:31 -0800 (PST) Received: from localhost.localdomain ([2.27.35.155]) by smtp.gmail.com with ESMTPSA id l3sm4629698wrt.29.2019.12.02.01.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 01:50:31 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.9 3/6] media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE Date: Mon, 2 Dec 2019 09:50:09 +0000 Message-Id: <20191202095012.559-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191202095012.559-1-lee.jones@linaro.org> References: <20191202095012.559-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Eugen Hristev [ Upstream commit a0816e5088baab82aa738d61a55513114a673c8e ] Control DO_WHITE_BALANCE is a button, with read only and execute-on-write flags. Adding this control in the proper list in the fill function. After adding it here, we can see output of v4l2-ctl -L do_white_balance 0x0098090d (button) : flags=write-only, execute-on-write Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Lee Jones --- drivers/media/v4l2-core/v4l2-ctrls.c | 1 + 1 file changed, 1 insertion(+) -- 2.24.0 diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index b3d8b9592f8a..6c0c5de2527b 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1007,6 +1007,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_FLASH_STROBE_STOP: case V4L2_CID_AUTO_FOCUS_START: case V4L2_CID_AUTO_FOCUS_STOP: + case V4L2_CID_DO_WHITE_BALANCE: *type = V4L2_CTRL_TYPE_BUTTON; *flags |= V4L2_CTRL_FLAG_WRITE_ONLY | V4L2_CTRL_FLAG_EXECUTE_ON_WRITE; From patchwork Mon Dec 2 09:50:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180559 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4969111ile; Mon, 2 Dec 2019 01:50:36 -0800 (PST) X-Google-Smtp-Source: APXvYqxO1dJQc1mIiuKxkrHmd2nRZHi1vx1q/prnGIS3LdxAJgUNkoEjH5k1TphPLAaiwB6gFe7G X-Received: by 2002:a50:ea8a:: with SMTP id d10mr60670893edo.97.1575280236186; Mon, 02 Dec 2019 01:50:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575280236; cv=none; d=google.com; s=arc-20160816; b=bkjcRR2a+GLGqZBpaS5azpAF299GA35ioeTruliD05swLrkE1PbhOx7L714mMKnvZs zgO8Gu1ysk26Oit2ANF/VCWg3TiTUo79ricbZYeQbTGt34vl/QsGsVtd9f2giHFjwCTY aAuvLIb0xvhkiONLNu+LfYKUs7luYfHT72AMjf/V5S5O7PUTMUaMcPX2VzcUstnssqu4 EvVlryYflQeF/1ujMomDxCrFg4lGzdtm5jYbnDQ1mCHtP1mjdtHg9J/tDjO6Aiw+MTCa dWv+84jIjRGr0FFQdCB29jOBVSAGcYywhcg3wpn4x7OR1vDHmsWRFTHtxsdrZ0YJCWwi 0rkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=cwSTsKyp+VB/yrtk55Z3QdqURnT8SdzS6bse74wQ6jk=; b=IrcAGLzmdLMg6sQkiyB1/+Oa84U/ethNabimqlBSw+quxL3LJ+KEJWKzgb1Xxzrx4z Z94wZc/V6ReyNFCIYn09V+gIj1ODU/MSeYQBtGbBT4rYoytNJNg5PUIPFhMEoUdab0MV 4PXuS/R3E6PAqy/xxElKAUWEZ8LQvYv6JIZZpvY+2hp2X9DXaz6YY/35iOe/Ckm78+Vb aAybYCKeP8qifRsFZ67HWG21zJ2UO/mDUDWATwBvhvrfnrbqwysUGmxEZ1MdIjxyF1fT AEhvV6MOoNLFjtwIzzfntv2mARueoHPdZRW929rStw+63IXANqToxmbIlREmJ7caVKgV 09sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L8rGxBrv; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j29si22786482edj.327.2019.12.02.01.50.35; Mon, 02 Dec 2019 01:50:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L8rGxBrv; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726474AbfLBJuf (ORCPT + 15 others); Mon, 2 Dec 2019 04:50:35 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43621 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbfLBJuf (ORCPT ); Mon, 2 Dec 2019 04:50:35 -0500 Received: by mail-wr1-f68.google.com with SMTP id n1so43370918wra.10 for ; Mon, 02 Dec 2019 01:50:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cwSTsKyp+VB/yrtk55Z3QdqURnT8SdzS6bse74wQ6jk=; b=L8rGxBrvBN4zhJoD7z3/4BPgF4sx4kYC1FH/wRUev01IT9jPUyxx6WL+MgsE4qOjkR F2SxNeRQtZd9oIoIgr5WfRRjLiLlVVgGN1iNO59Y+/VfDJrnZVft1Mv8m0lofkJMIdLn 679rRZoCSJtIw2fZVWt3HShMKX+PW9xieNwvuapCY/9OyR4b9RDaJ6w6uxXBP7KJyYe8 efI//8FgZrqLE5X3Bdk5Mkf28i/Q1M3GVIi0xAGxgqvF1PbeW960cIm/LtKRmHGtC7vB ZMbqv+A4/LzyahZSYQJ9lmzuIYCd52j1ppa7XFU7fmktnnEY4rGjeqDMyuV/qqf+beFD 9HSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cwSTsKyp+VB/yrtk55Z3QdqURnT8SdzS6bse74wQ6jk=; b=dwP73ILMhTJvD+FyoufHd1INQwAF9CakKQY6bAZEXpnFiPIpjCB1CGtTfBQoimYpqS XqnUiPpn92kyUSWE9wXaKK4Qa8KFPq2lrtY8IcYnKB+zIaNumfqxKsBUjHQiUyDSB7oL +LJv1v1jhfC6mI/SB9lbFFMS9ZAFRg/aFCvLO8uN9pBBj8um323wun02Vgcj9gGr9iwU Nljq5yNplXpBxjnqU2nKwY4Xom0UTbzjpzjXsebrurXzl2GiLDOZG1Mt+N9T7YeKNxGg hxTP6kTIuKBtWfSYY21gYFRd+RirKDx8xOAng9FcaBbqHDFtXf55UY4joxVH77qsF2OQ pehA== X-Gm-Message-State: APjAAAUoAAOQXS7fHjxP5ZQVRfiqS7dSNfM4ncenFo3TKT8yimLMpzZj 5LRfQvSBjAkUueErkKjcycRjQY5jIwY= X-Received: by 2002:adf:ea4e:: with SMTP id j14mr19775324wrn.101.1575280232603; Mon, 02 Dec 2019 01:50:32 -0800 (PST) Received: from localhost.localdomain ([2.27.35.155]) by smtp.gmail.com with ESMTPSA id l3sm4629698wrt.29.2019.12.02.01.50.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 01:50:32 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.9 4/6] net: macb: fix error format in dev_err() Date: Mon, 2 Dec 2019 09:50:10 +0000 Message-Id: <20191202095012.559-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191202095012.559-1-lee.jones@linaro.org> References: <20191202095012.559-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Luca Ceresoli [ Upstream commit f413cbb332a0b5251a790f396d0eb4ebcade5dec ] Errors are negative numbers. Using %u shows them as very large positive numbers such as 4294967277 that don't make sense. Use the %d format instead, and get a much nicer -19. Signed-off-by: Luca Ceresoli Fixes: b48e0bab142f ("net: macb: Migrate to devm clock interface") Fixes: 93b31f48b3ba ("net/macb: unify clock management") Fixes: 421d9df0628b ("net/macb: merge at91_ether driver into macb driver") Fixes: aead88bd0e99 ("net: ethernet: macb: Add support for rx_clk") Fixes: f5473d1d44e4 ("net: macb: Support clock management for tsu_clk") Acked-by: Nicolas Ferre Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Lee Jones --- drivers/net/ethernet/cadence/macb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.24.0 diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index a0d640243df2..30e93041bf83 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -2364,14 +2364,14 @@ static int macb_clk_init(struct platform_device *pdev, struct clk **pclk, *pclk = devm_clk_get(&pdev->dev, "pclk"); if (IS_ERR(*pclk)) { err = PTR_ERR(*pclk); - dev_err(&pdev->dev, "failed to get macb_clk (%u)\n", err); + dev_err(&pdev->dev, "failed to get macb_clk (%d)\n", err); return err; } *hclk = devm_clk_get(&pdev->dev, "hclk"); if (IS_ERR(*hclk)) { err = PTR_ERR(*hclk); - dev_err(&pdev->dev, "failed to get hclk (%u)\n", err); + dev_err(&pdev->dev, "failed to get hclk (%d)\n", err); return err; } @@ -2385,25 +2385,25 @@ static int macb_clk_init(struct platform_device *pdev, struct clk **pclk, err = clk_prepare_enable(*pclk); if (err) { - dev_err(&pdev->dev, "failed to enable pclk (%u)\n", err); + dev_err(&pdev->dev, "failed to enable pclk (%d)\n", err); return err; } err = clk_prepare_enable(*hclk); if (err) { - dev_err(&pdev->dev, "failed to enable hclk (%u)\n", err); + dev_err(&pdev->dev, "failed to enable hclk (%d)\n", err); goto err_disable_pclk; } err = clk_prepare_enable(*tx_clk); if (err) { - dev_err(&pdev->dev, "failed to enable tx_clk (%u)\n", err); + dev_err(&pdev->dev, "failed to enable tx_clk (%d)\n", err); goto err_disable_hclk; } err = clk_prepare_enable(*rx_clk); if (err) { - dev_err(&pdev->dev, "failed to enable rx_clk (%u)\n", err); + dev_err(&pdev->dev, "failed to enable rx_clk (%d)\n", err); goto err_disable_txclk; } @@ -2823,7 +2823,7 @@ static int at91ether_clk_init(struct platform_device *pdev, struct clk **pclk, err = clk_prepare_enable(*pclk); if (err) { - dev_err(&pdev->dev, "failed to enable pclk (%u)\n", err); + dev_err(&pdev->dev, "failed to enable pclk (%d)\n", err); return err; } From patchwork Mon Dec 2 09:50:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180560 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4969163ile; Mon, 2 Dec 2019 01:50:39 -0800 (PST) X-Google-Smtp-Source: APXvYqxwZIMnsVlKTHqRwwmO2nihZpjgMXApt0JYvF6gljDB9iU5WIN6g30rEHpAi3QzIERaXyHv X-Received: by 2002:aa7:c144:: with SMTP id r4mr14563068edp.283.1575280239660; Mon, 02 Dec 2019 01:50:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575280239; cv=none; d=google.com; s=arc-20160816; b=aqBXUWwXBpnOJxPV5+SzvCb9b0Yci1p9ottwpOeytf9h7KQFTSwaFji3PumFQmJ6rD 1ccMJAGGK2HkioJYdOiMmYW/2VoJ6UI5D/kBcya15Q28ebHSr7MxOZsEDgRg1wzcSHwH bWxCwnsgC2fxEOwkzSNL3PYDYXr3nsC2mn+/C08w4R94JvLbU1RUFqfEmDqLgQRARmMC G2pJrbqyOhh7K72HWSC0qqPML/1faXoHmXqbmEliNFPONoaoi+M/A8buLqdtwocQ1mht HT+YmDuJgdcEcVyhhHmiD1rjcgYOBWm0iij3zWpSGUHIJSxF+YlpjRGTUO7hT83LCMSg 3bqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=sTCSXd78U2S/J9+STbmGQvoMaUMY3h0oPjBdZMZTRIE=; b=ikqGp9fGrHCLhUTSC5HQpAXc5yXRZH6eHi5izNXYL9ZWF5zbmjOiEOvM2P7kScLGAH gjT5foKrqQSo4SXg0OpRTcw/Dabx5FLKCikmemyklH59IdVFO0XLGljvvTMv2LkvzES8 1X1cJN6r9ATcjip2ldMxcQxOLzs6sWTkmSD34unzN0+x0MvQMSNZYpI7pYjd3th7kHf9 RgGBH7gbHpqQiGTQVHDUfUW7azasO2rNskcAtsfxVlji9AlNqhoQrLVW2Fj31mvrsYox sUNqLx4GbYeGyUJlPY9KftTIaa03xeU6oG1HFVzivbe9BKQfmYJ/R59IOOR+LXE1FliN oCYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R0Ig0HYR; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j29si22786482edj.327.2019.12.02.01.50.39; Mon, 02 Dec 2019 01:50:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R0Ig0HYR; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726534AbfLBJuj (ORCPT + 15 others); Mon, 2 Dec 2019 04:50:39 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41094 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbfLBJui (ORCPT ); Mon, 2 Dec 2019 04:50:38 -0500 Received: by mail-wr1-f66.google.com with SMTP id b18so43349132wrj.8 for ; Mon, 02 Dec 2019 01:50:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=sTCSXd78U2S/J9+STbmGQvoMaUMY3h0oPjBdZMZTRIE=; b=R0Ig0HYRN+qNhimffv4Awp+ud4+0Ohj2iBqYbDnJqOmtT2ljqzKm/B9LsnQ98vA9u6 rVmg+bqhBAJkKw+ahqOP5kYQ9KwD3qQwu71XdMpgTY5x22URu2VR2d3Y3iaXJxlseFzL ILxW/lPu1pvJuNVRRSLdIzREHXW4kLvcdfJozxoYftMEHfg1vU8L4nuKhIHqy1bBrkIn HvncZSIxxan+mJGwoaevZhr4WlxpkfynzM5bC11/6j0o562acFGR2Y/7P49aTv05oXwu 1oGlRbNGNH6AXBmFPJcpTN77Kh+1WUkUtAhJiR2THK4DNZT+gXWnJqLXwOeZBfmnee2Z y1Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sTCSXd78U2S/J9+STbmGQvoMaUMY3h0oPjBdZMZTRIE=; b=LuCKNrpkij3MzXXlZyE9yg3VWQ4MopgOxaKF4ljTp7IdsoxqAdgRbgjjU2qVDMql4D JgDzBHS1hdjWZAe29kEmoHFV2f4pnxTuwwsz8WsRd/Nyhx/+ViKr5kGuGFfOcOPiRGE8 DPCB4vcT49UTCVd6w3FzroG6rqlhnVROxRPkyHl6+eYuAIbDoqg2eIsrw5u5Obo4ocHf mwGxNfJ9KPE2ZI7g16GiGJ3fsC0Nzzm8n1A51Ag166ZtQ+IAvi5BAm32nrKxmnELXvkT RMttgiAHVW01LQYSQ10mHvRxqcYt+HBiDJxLHC+AzNpc2vnsP6opeaU/JkL+sWMCatF/ 81hw== X-Gm-Message-State: APjAAAVkLD/79TZnq1Lr+QPFuCxLyxgTX404PHo8IvUDuYmRuBIY1y1y 03jBn6jpMV1zjCi2J0gyO3K+z4s5xvs= X-Received: by 2002:a5d:49c7:: with SMTP id t7mr12719589wrs.369.1575280236523; Mon, 02 Dec 2019 01:50:36 -0800 (PST) Received: from localhost.localdomain ([2.27.35.155]) by smtp.gmail.com with ESMTPSA id l3sm4629698wrt.29.2019.12.02.01.50.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 01:50:36 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.9 5/6] media: atmel: atmel-isc: fix asd memory allocation Date: Mon, 2 Dec 2019 09:50:11 +0000 Message-Id: <20191202095012.559-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191202095012.559-1-lee.jones@linaro.org> References: <20191202095012.559-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Eugen Hristev [ Upstream commit 1e4e25c4959c10728fbfcc6a286f9503d32dfe02 ] The subsystem will free the asd memory on notifier cleanup, if the asd is added to the notifier. However the memory is freed using kfree. Thus, we cannot allocate the asd using devm_* This can lead to crashes and problems. To test this issue, just return an error at probe, but cleanup the notifier beforehand. Fixes: 106267444f ("[media] atmel-isc: add the Image Sensor Controller code") Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Lee Jones --- drivers/media/platform/atmel/atmel-isc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.24.0 diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c index ccfe13b7d3f8..ecf9fb08f36b 100644 --- a/drivers/media/platform/atmel/atmel-isc.c +++ b/drivers/media/platform/atmel/atmel-isc.c @@ -1297,8 +1297,11 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc) break; } - subdev_entity->asd = devm_kzalloc(dev, - sizeof(*subdev_entity->asd), GFP_KERNEL); + /* asd will be freed by the subsystem once it's added to the + * notifier list + */ + subdev_entity->asd = kzalloc(sizeof(*subdev_entity->asd), + GFP_KERNEL); if (subdev_entity->asd == NULL) { of_node_put(rem); ret = -ENOMEM; @@ -1432,6 +1435,7 @@ static int atmel_isc_probe(struct platform_device *pdev) &subdev_entity->notifier); if (ret) { dev_err(dev, "fail to register async notifier\n"); + kfree(subdev_entity->asd); goto cleanup_subdev; } From patchwork Mon Dec 2 09:50:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180561 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4969181ile; Mon, 2 Dec 2019 01:50:41 -0800 (PST) X-Google-Smtp-Source: APXvYqyBhz4M/Il1YfO/LWVctZFjUefxIrRaBKBVExlmC+LxXzP3LdW1qvzlFgtfuVRDMkkAr88N X-Received: by 2002:a17:906:5c4d:: with SMTP id c13mr76237674ejr.80.1575280241066; Mon, 02 Dec 2019 01:50:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575280241; cv=none; d=google.com; s=arc-20160816; b=p2Poxl0EwiKwoM3qOi6mIoSXs7Z9SUk4t7V5082U0w9uIs4RSBCWwwBE0O9s8bWqYg fPG/lDF+Lk4l91S4i7UtRfEGOoBlnUD8y7sqyIPTFFaHoPojFVs4/uwY1YE/LzLqQXEo zbu9XHHJXGzUfi1nkmH9K9rLDa/rQHXorEd1lxzvK0pWNFSxIeOTeV5PcS5m5MRWXzWr Opoyet1OYHyaYVukhxZzFq75uuS2C/vPlpvAQDEPf8dzAaxu1OBtf8Iza+gC15kp7lIO kKF1YTZ7/sztauHnqNqY6L0oQ6rqMCOir0g1iohEALzf2Iug15volMRJlOt4B4gnPVVj HevA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=wN8Wz+OqrhKIKYPYJBtEtZFwg/h6OwVz+bEt3kPQDmY=; b=nLmPMmMIlGPGI8bG/hQ5ogcjpyAK2phYaYTm79WLG3dhPrWzQ49rqXlanL67c0EhHw WuYXZQL+v2AenKaaDfjP1TWMgwOqVrnX5MMohSBSx+oC7NF+ta/ZOVyJ6h2GiZrMZ8/+ MDY0s/iuWlYxe/LUpWiZQvgiPP239/rNBT4meW4ztZCzmTy39MHJrDuxxAUIAzTGXJqz hMS+dKUa0jZUos7RO0dd7KuU456s0BDq2W8oLQfYX4k90AalA5/Wb0CILSdbNzGTH9Zn bXeWkwoHLGG0dLVyanAMCZJOkc0xmwZiceEEOK1v/VB3zE1fOrtwEgGvXvBQIfjKhZs0 DuRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZBoXUFkb; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j29si22786482edj.327.2019.12.02.01.50.40; Mon, 02 Dec 2019 01:50:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZBoXUFkb; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726482AbfLBJuk (ORCPT + 15 others); Mon, 2 Dec 2019 04:50:40 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37125 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726516AbfLBJuk (ORCPT ); Mon, 2 Dec 2019 04:50:40 -0500 Received: by mail-wr1-f65.google.com with SMTP id w15so12391054wru.4 for ; Mon, 02 Dec 2019 01:50:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=wN8Wz+OqrhKIKYPYJBtEtZFwg/h6OwVz+bEt3kPQDmY=; b=ZBoXUFkbnH8Nk0M78+uLkLXG2r75Jp55gnODei+w5Wzf8ES8AnNWwGP2DhStJrAiSw gAR7Pv4lO6AqALrbvke8JAPTsYYHnG11Fz2/1N1SBwTMTIC3Q5QCsmxgRn3D5f+dBl1a pm1arcPhf8wrapz+1b7sSCklviJUQTollywnruF+H3Gnpv46MIvMN4zm5FqmvmXFJEBT M3YQhtK5Ir/IrNoMOWlHDt42MhlitnP/OGCPvDfsbkl4NckIvaHpGfKQlLiSGZFENebi DAgzts4rJYtS5dWQQOfDkkZYo7MdZ6PYZXGJxL4npbE3v53vywwuFy5mNN/mGnjUNY1N aIUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wN8Wz+OqrhKIKYPYJBtEtZFwg/h6OwVz+bEt3kPQDmY=; b=jzBw9J9oi3lIWin1U9AaRsCeNYaqpXYckwL6SYANtGoMMOE4Ooyrzyzok/ip2VYoaX /ahTcRKtnwv8LRleGgJirIhXfp2M3TqDQxGOXlAO3xklPXhicItgIK2QrwcAhgmrFjf7 OtmxOSCr+lK4As9zssCwotr9gDX+QyPRruimYqV/vCtd2s8Pf7MUf1DkQ39wCTe8KEwU kqWZRZ3ag5pwm3XDU+UCcAWDjYCrOzH8C+/kTx9EqRtNhq9yBUeZ5RUQEiJy84WVbVla poGsFzgOiUnt2/obp27at0UBaWbOUiR2ukZNDhUD/QikP36xpvaWbsjioEua/ZGnCrmG zI6w== X-Gm-Message-State: APjAAAUrifFZ7HpidXvKl3sMVnl6DqHA3MiHDlasJ9Tt1NOdLfouQIUj E9Rg87g/wboQjU43c1uUD11toe2uQlk= X-Received: by 2002:adf:f64b:: with SMTP id x11mr49606523wrp.355.1575280237891; Mon, 02 Dec 2019 01:50:37 -0800 (PST) Received: from localhost.localdomain ([2.27.35.155]) by smtp.gmail.com with ESMTPSA id l3sm4629698wrt.29.2019.12.02.01.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 01:50:37 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.9 6/6] pwm: Clear chip_data in pwm_put() Date: Mon, 2 Dec 2019 09:50:12 +0000 Message-Id: <20191202095012.559-6-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191202095012.559-1-lee.jones@linaro.org> References: <20191202095012.559-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Uwe Kleine-König [ Upstream commit e926b12c611c2095c7976e2ed31753ad6eb5ff1a ] After a PWM is disposed by its user the per chip data becomes invalid. Clear the data in common code instead of the device drivers to get consistent behaviour. Before this patch only three of nine drivers cleaned up here. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding Signed-off-by: Lee Jones --- drivers/pwm/core.c | 1 + drivers/pwm/pwm-berlin.c | 1 - drivers/pwm/pwm-samsung.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) -- 2.24.0 diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index a19246455c13..cc12032ee60d 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -858,6 +858,7 @@ void pwm_put(struct pwm_device *pwm) if (pwm->chip->ops->free) pwm->chip->ops->free(pwm->chip, pwm); + pwm_set_chip_data(pwm, NULL); pwm->label = NULL; module_put(pwm->chip->ops->owner); diff --git a/drivers/pwm/pwm-berlin.c b/drivers/pwm/pwm-berlin.c index 01339c152ab0..64d9bb1ac272 100644 --- a/drivers/pwm/pwm-berlin.c +++ b/drivers/pwm/pwm-berlin.c @@ -78,7 +78,6 @@ static void berlin_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) { struct berlin_pwm_channel *channel = pwm_get_chip_data(pwm); - pwm_set_chip_data(pwm, NULL); kfree(channel); } diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c index f113cda47032..219757087995 100644 --- a/drivers/pwm/pwm-samsung.c +++ b/drivers/pwm/pwm-samsung.c @@ -235,7 +235,6 @@ static int pwm_samsung_request(struct pwm_chip *chip, struct pwm_device *pwm) static void pwm_samsung_free(struct pwm_chip *chip, struct pwm_device *pwm) { devm_kfree(chip->dev, pwm_get_chip_data(pwm)); - pwm_set_chip_data(pwm, NULL); } static int pwm_samsung_enable(struct pwm_chip *chip, struct pwm_device *pwm)