Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3508310pxf; Mon, 22 Mar 2021 08:03:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQQk/lxcEr1reVmIDCYcCk7FGb+JIGVi3EeszWy3f0mXqAoshXnmQY8PBN1HacQuJ6tUcA X-Received: by 2002:aa7:c447:: with SMTP id n7mr26023961edr.171.1616425392033; Mon, 22 Mar 2021 08:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616425392; cv=none; d=google.com; s=arc-20160816; b=n3nHfq6gWf9OhUj96yJzrv7bPWp2HTwu5ThjBmaggK8PrwA5wA0IjSsQBQgSFM72Yz SwNDptDa9omREGTSBlEzq7IIQwkiJEVuYSYryruslsMol9Zdu78E3vHi8slOLhuGU/BC Q6g6EXhQXbR2Ef05qFUbXtBgdQ0RZHa4K7FW6pJW5Ju2tvY68z7ruPc/5apTnvci92MO lsfxMvk0nkE9ZFyOPMav433mo1g6TcrxjBbSUppts2HouOG67RIMWy6fLQKDpnbpb0Oj 8iV14OoK9C/Vi+Oz0Pk/Xni3es9N5Y5DHMxho01ahdm8UHwcrX0fFkjnsfNelGZbiHmy Pzpw== 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=gp+eJe90hnMYUzYG4rwxQipLYDDLgWdFzsvkuKwQO74=; b=L/hggym1G6fPxDbkpRs1ytpPlfuSKvzt2yro585ICJZXdr2hMaM09xxZGPBjDWDRYh bJGM8wiXm0wznhPG2KLDnFrOQ7ENrEMwU8u2GWK+WEbbUMfSau6qdLMGr8TdtOYgoM2S aZmuQnGpQdhcfIlWrD8u7BwJ/9VTQjMDN8Mv4fO340XHSCN8YgaxLsgm3Obtkvx2qJ+d /wTADs4QFR+ObaNBeemfUJpq+O0YAFp9vwf8PunWRAlrqAJdpEoJLKmUxPAUaXHy2/c3 rk8FaBAsIHvvFrQe2OHrwbQ6lAB7+0c0kKqhCzqaDD+lH0086JL85FI5jr5F7UXLwphg szPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z26si12426257ejc.46.2021.03.22.08.02.46; Mon, 22 Mar 2021 08:03:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbhCVO7U (ORCPT + 99 others); Mon, 22 Mar 2021 10:59:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230021AbhCVO7C (ORCPT ); Mon, 22 Mar 2021 10:59:02 -0400 X-Greylist: delayed 599 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 22 Mar 2021 07:59:01 PDT Received: from newton.telenet-ops.be (newton.telenet-ops.be [IPv6:2a02:1800:120:4::f00:d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 884B6C061574 for ; Mon, 22 Mar 2021 07:59:01 -0700 (PDT) Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by newton.telenet-ops.be (Postfix) with ESMTPS id 4F3y7957LmzMr38h for ; Mon, 22 Mar 2021 15:48:53 +0100 (CET) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:250b:f16c:c5e2:505d]) by michel.telenet-ops.be with bizsmtp id jSot2400n2HDxaV06Sotqb; Mon, 22 Mar 2021 15:48:53 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lOLrR-009ZWP-1G; Mon, 22 Mar 2021 15:48:53 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1lOLrP-004T6Z-S7; Mon, 22 Mar 2021 15:48:51 +0100 From: Geert Uytterhoeven To: Robin van der Gracht , Rob Herring , Miguel Ojeda , Paul Burton , Greg Kroah-Hartman Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 13/17] auxdisplay: ht16k33: Move delayed work Date: Mon, 22 Mar 2021 15:48:44 +0100 Message-Id: <20210322144848.1065067-14-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210322144848.1065067-1-geert@linux-m68k.org> References: <20210322144848.1065067-1-geert@linux-m68k.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move delayed_work from ht16k33_fbdev to ht16k33_priv, as it is not specific to dot-matrix displays, but common to all display types. Signed-off-by: Geert Uytterhoeven --- drivers/auxdisplay/ht16k33.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c index 37fca1d44c3e73e1..91b039702270ab10 100644 --- a/drivers/auxdisplay/ht16k33.c +++ b/drivers/auxdisplay/ht16k33.c @@ -65,11 +65,11 @@ struct ht16k33_fbdev { uint32_t refresh_rate; uint8_t *buffer; uint8_t *cache; - struct delayed_work work; }; struct ht16k33_priv { struct i2c_client *client; + struct delayed_work work; struct ht16k33_keypad keypad; struct ht16k33_fbdev fbdev; }; @@ -117,7 +117,7 @@ static void ht16k33_fb_queue(struct ht16k33_priv *priv) { struct ht16k33_fbdev *fbdev = &priv->fbdev; - schedule_delayed_work(&fbdev->work, HZ / fbdev->refresh_rate); + schedule_delayed_work(&priv->work, HZ / fbdev->refresh_rate); } /* @@ -125,10 +125,9 @@ static void ht16k33_fb_queue(struct ht16k33_priv *priv) */ static void ht16k33_fb_update(struct work_struct *work) { - struct ht16k33_fbdev *fbdev = - container_of(work, struct ht16k33_fbdev, work.work); - struct ht16k33_priv *priv = - container_of(fbdev, struct ht16k33_priv, fbdev); + struct ht16k33_priv *priv = container_of(work, struct ht16k33_priv, + work.work); + struct ht16k33_fbdev *fbdev = &priv->fbdev; uint8_t *p1, *p2; int len, pos = 0, first = -1; @@ -436,7 +435,7 @@ static int ht16k33_probe(struct i2c_client *client) } fb_bl_default_curve(fbdev->info, 0, MIN_BRIGHTNESS, MAX_BRIGHTNESS); - INIT_DELAYED_WORK(&fbdev->work, ht16k33_fb_update); + INIT_DELAYED_WORK(&priv->work, ht16k33_fb_update); fbdev->info->fbops = &ht16k33_fb_ops; fbdev->info->screen_base = (char __iomem *) fbdev->buffer; fbdev->info->screen_size = HT16K33_FB_SIZE; @@ -502,7 +501,7 @@ static int ht16k33_remove(struct i2c_client *client) struct ht16k33_priv *priv = i2c_get_clientdata(client); struct ht16k33_fbdev *fbdev = &priv->fbdev; - cancel_delayed_work_sync(&fbdev->work); + cancel_delayed_work_sync(&priv->work); unregister_framebuffer(fbdev->info); framebuffer_release(fbdev->info); free_page((unsigned long) fbdev->buffer); -- 2.25.1