Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp737567pxb; Tue, 14 Sep 2021 07:43:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/07GjGZ5x7IP+df+SBd8XkGD6tap4IzXqyiQ0rfiXibZOr+yO2lg6KsGU3EdQVvC3BuFp X-Received: by 2002:a50:ff0b:: with SMTP id a11mr19467128edu.373.1631630599891; Tue, 14 Sep 2021 07:43:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631630599; cv=none; d=google.com; s=arc-20160816; b=NvGpv+z8+axlPw9JiZwrdN4aNnft+fXGrGiZj23wLdXZmLzVSGP/SMiPzpGR/sdTYG JNJh2wqnVfCMZ6+WK3Kx3adKcL6n1WY4YhZmykruxnZgAgWYoZKB57msLlPQhSz+ZmGw EgTBAbnj4EJdv/+y+vzbvmjIrQkn7CH6TWFgnuAHXr6742ZpSBQxKHF6ppgOiJ49xt22 WGHfxiNY12speTTDnQj9Der6q1VOtSenFQ7KfDNjl5GccNW5jArftAMlnbAMUBezH/c7 3tJ81oeQmEE4hCtlHBtkl9pCpiIYHO9vG9scfdedKO6auerC2Dd3RWI70eUIf+4/ZgbD iIAA== 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=XTQnJMhBa4FRUodogY7I5hrqCdk79TXPoA2STyavx7c=; b=eoFJQLDYhuWJLQvWW3DFFDSAx3yYbZWweoSi1aiKxqRInSYU1VGL76CpgJ+N44KQlx YqOEHW31Wa2JOEKxQ2/Sv6Ad1akkqy+9dR1iPSu8nP3N7nwzSBYk19n4Zza7EvxiVpM/ acbM2ny7IWaDQvLSDLa418TdRKV7I+BmyRyz/zUGDPq9gXsn3bm08X8ic412ncDLOiQk 29ABJzB3tlhFLezwD5XZPuejXqOa7PNp2bIqvVkeM8/RZjReZwvji//EgKlEvp7OCdZX rgIaKdXyeEfVlwMd4u8FkhMH5CFXUulPIdX4AQxxC0EdFuqwjr8/yV3pXp1Bvm/YhHXa 3HOQ== 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 m27si11058163ejl.443.2021.09.14.07.42.56; Tue, 14 Sep 2021 07:43:19 -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 S234625AbhINOk6 (ORCPT + 99 others); Tue, 14 Sep 2021 10:40:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234203AbhINOkO (ORCPT ); Tue, 14 Sep 2021 10:40:14 -0400 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43C6CC0613AD for ; Tue, 14 Sep 2021 07:38:44 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:d46f:7eb5:4a37:9d14]) by laurent.telenet-ops.be with bizsmtp id tqeh250072aSKa101qehED; Tue, 14 Sep 2021 16:38:43 +0200 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 1mQ9a4-004VHA-BO; Tue, 14 Sep 2021 16:38:40 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mQ9a2-0028za-Rj; Tue, 14 Sep 2021 16:38:38 +0200 From: Geert Uytterhoeven To: Robin van der Gracht , Miguel Ojeda , Rob Herring , Paul Burton Cc: Greg Kroah-Hartman , Pavel Machek , Marek Behun , devicetree@vger.kernel.org, linux-leds@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v6 14/19] auxdisplay: ht16k33: Move delayed work Date: Tue, 14 Sep 2021 16:38:30 +0200 Message-Id: <20210914143835.511051-15-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210914143835.511051-1-geert@linux-m68k.org> References: <20210914143835.511051-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 --- v6: - No changes, v5: - No changes, v4: - No changes, v3: - No changes, v2: - No changes. --- 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 75d326a823543898..c7a3a0e1fbb5d03e 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; @@ -462,7 +461,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