Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp2153359rdb; Thu, 17 Aug 2023 12:16:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFMYLZm+TIYILL66Naj9F303eR2vXZ6FgwWjmWvFBHXlG96kxQJoIheHt6Hb5awvqqUZk9M X-Received: by 2002:a05:6a00:b8e:b0:687:82a4:4a03 with SMTP id g14-20020a056a000b8e00b0068782a44a03mr529458pfj.20.1692299795006; Thu, 17 Aug 2023 12:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692299794; cv=none; d=google.com; s=arc-20160816; b=0Vo1D1RFGjQ0m76BVvTYynmNW3jA7V5wpkYSnDbMlWKFCgfbIte33Aia0hs7uYiTb1 AACK5ZYyb6BfAO9NtU/2aGOADYT5AiFqjrGIyYu0h+5LsDXq15zirIZDFSEjIgF8RZ5b RPfZRkuq/XRsB7/4+G3KihrMv0l3DWuGIUGW8qSow17AgYsrcoPfyVkgY9xMo4ABOJMf 28ACV1L4mILXczbrjqriY3FzUqGlKuzbdOu3V/cr0Ualo2Mknejk8plen9fwtFSp+qUt vwrTcnpSq/17g8oAy3ig82WYFY0Uwdb6B6j0H4ck0zF8Kdo6ZZbYnePtTcKm2ljNYvZA J0TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=l3+41aK04FGeUpZNNFkebJ+9DsBBlvemxoAiYGjViOk=; fh=OmmZDJEp3pl7jaFV8O2/yN66VkuJIFqajAiD2ZUHFno=; b=x1fvLtHQxkw72tlvTq0kvZwHxbU1q7wDeK5X+6X1IfSEtnsCR7/r+4jWLvwaw3hI0e oNPPgDWpI4qYqYs+9KfNYqgOTfYrH+ar1kXRsK0CI6wrVgUz+NfEoh60zI9qX8oQdb+o a6ky6T+8ugd/g0zpad8RUySaMxcFUr1Qp/51uo2faQOhPPe/1/VuaVSuaFJV/rBjH9sd 3qJzf3QEheQ2LljkuNhSRV12yTiLhjzpFNopjzL5QjOelkR6x5mLTzyAs75EsHFrfTA7 P4wUAzqpW+BQgTFEW92bRyztsSHsXG1DFI0lZoIhLV5xJV+TFPXLg1YNVA7QQHG7ZMr1 stXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f9-20020a056a001ac900b00689f1dd2376si135257pfv.233.2023.08.17.12.16.14; Thu, 17 Aug 2023 12:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244200AbjHPKpw (ORCPT + 99 others); Wed, 16 Aug 2023 06:45:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244027AbjHPKpL (ORCPT ); Wed, 16 Aug 2023 06:45:11 -0400 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B7A32719 for ; Wed, 16 Aug 2023 03:44:50 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5d0c:f209:12a7:4ce5]) by michel.telenet-ops.be with bizsmtp id aAkh2A00F45ualL06Akh1o; Wed, 16 Aug 2023 12:44:42 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qWE0w-000osO-UH; Wed, 16 Aug 2023 12:44:41 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qWDAw-00675S-Mo; Wed, 16 Aug 2023 11:50:50 +0200 From: Geert Uytterhoeven To: Laurent Pinchart , Kieran Bingham , David Airlie , Daniel Vetter , Thomas Zimmermann , Magnus Damm Cc: dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Laurent Pinchart Subject: [PATCH v3 17/41] drm: renesas: shmobile: Convert to use devm_request_irq() Date: Wed, 16 Aug 2023 11:50:24 +0200 Message-Id: <073cc8d262c6d9eaac0d00fca29cf7282c7acf10.1692178020.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert to managed IRQ handling, to simplify cleanup. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by. --- drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c index 91daab80b0ede058..381e184abf552c4c 100644 --- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c +++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c @@ -196,7 +196,6 @@ static int shmob_drm_remove(struct platform_device *pdev) drm_dev_unregister(ddev); drm_kms_helper_poll_fini(ddev); - free_irq(sdev->irq, ddev); drm_dev_put(ddev); return 0; @@ -279,8 +278,8 @@ static int shmob_drm_probe(struct platform_device *pdev) goto err_modeset_cleanup; sdev->irq = ret; - ret = request_irq(sdev->irq, shmob_drm_irq, 0, ddev->driver->name, - ddev); + ret = devm_request_irq(&pdev->dev, sdev->irq, shmob_drm_irq, 0, + ddev->driver->name, ddev); if (ret < 0) { dev_err(&pdev->dev, "failed to install IRQ handler\n"); goto err_modeset_cleanup; @@ -292,14 +291,12 @@ static int shmob_drm_probe(struct platform_device *pdev) */ ret = drm_dev_register(ddev, 0); if (ret < 0) - goto err_irq_uninstall; + goto err_modeset_cleanup; drm_fbdev_generic_setup(ddev, 16); return 0; -err_irq_uninstall: - free_irq(sdev->irq, ddev); err_modeset_cleanup: drm_kms_helper_poll_fini(ddev); err_free_drm_dev: -- 2.34.1