Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7093497rwp; Tue, 18 Jul 2023 09:56:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlG/or2HuI3ep5h9Tk0MKpluSZJwtEESRQgiVUro7KvgqEZVuFcYMjlKDLgKxLP9Y+RTUZM3 X-Received: by 2002:a05:6a20:8426:b0:133:15f1:674c with SMTP id c38-20020a056a20842600b0013315f1674cmr13833393pzd.3.1689699406588; Tue, 18 Jul 2023 09:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689699406; cv=none; d=google.com; s=arc-20160816; b=I1c2IAw4UMELYnQSkD1noRtMn8h+gpHnUWDBCqDfDkdJTCoPSBKnsXxo3m3V1dvkKd MByPOrs39B6xbQFcWJjZslr6JsdsCUwTwHzm+dqDqDoxxyq4UcAaJjSpW1A0P0QYbh1W Chy9o5ZkbJe+9q1E3ZTfqFYh6qXhUThzV055LDyosict2/b/lWsZAhkm+xaxSsrWFYXP wLE/lOCTzkCNpj48ejUD1kK4Hc8HzQbBOrqH53r+dqrcKlwOjo7HqYoAerrJEVTilZCW WdO3o9qpBswLue4KsFw2Y4fVQlGW7Vx3y6Nhyg3XmEXGkEtN/wEpZa2W0DqoX31qC8Fg Hffg== 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=btzpp39GOfocH+3no9OQwVCWMJgIS3csZoyJhJ4HooA=; fh=Ople2ijcDVdvBJwvAg2RvyZp0qNZK7It46SN0LxlrVk=; b=jYRKFPiJ1oYDQHQktYuy8H29Dv6+jRXvlYfCeYD2I3rqnHtjddiYBxfS+reBUjY98x a+pfu0HHfg3JS427snnQBzuGJ3r8KPq5FZV+IaTaLtavw6vnyfuYVQYeRUDFBaZJ9nfg dSO9rTpgsJHDQEzSO/G4sGGZoNeYQAvKIRXOD+EltfyNFIVE9rK04uZ4aTQ2xc9XiueF 3U93sAlynv7aRjNVlL7bh2FnyRjJt6bdW7Mp617LGSkjsavwYnqnDaT6bRFtz/1xa1hQ eG84/y/Teaio9NFdvExdWMOizzIph0GWiMenv7gitf51faLGhmfVynULewi/hymhjBsE 17Vw== 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 o11-20020a63920b000000b005582ab00bedsi1874857pgd.387.2023.07.18.09.56.34; Tue, 18 Jul 2023 09:56:46 -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 S232183AbjGRQzn (ORCPT + 99 others); Tue, 18 Jul 2023 12:55:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232573AbjGRQzA (ORCPT ); Tue, 18 Jul 2023 12:55:00 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 272D219A8 for ; Tue, 18 Jul 2023 09:54:54 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5803:2d6d:5bbc:e252]) by albert.telenet-ops.be with bizsmtp id Ngur2A00R0ucMBo06gurSd; Tue, 18 Jul 2023 18:54:52 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qLnyD-001nYX-BX; Tue, 18 Jul 2023 18:54:51 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qLnyN-000gcT-Ch; Tue, 18 Jul 2023 18:54:51 +0200 From: Geert Uytterhoeven To: Laurent Pinchart , Kieran Bingham , David Airlie , Daniel Vetter , Thomas Zimmermann , Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Laurent Pinchart Subject: [PATCH v2 17/41] drm: renesas: shmobile: Convert to use devm_request_irq() Date: Tue, 18 Jul 2023 18:54:22 +0200 Message-Id: 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=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 --- 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