Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp83446pxb; Thu, 30 Sep 2021 01:27:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSUsa6ivo8lRWn6stS/P9omRws8WSH8eK4iDn9MjIN/w+DLp53LjoFZPDdDCOpg7GdxsDW X-Received: by 2002:a50:cd87:: with SMTP id p7mr5510049edi.294.1632990469407; Thu, 30 Sep 2021 01:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632990469; cv=none; d=google.com; s=arc-20160816; b=qhSO/MX3VTQmb7cDf1QByIBKSORTSHMqYF+OJd6rlMnXwIAdRIjRyO8KzYeNBsz/zJ y2G/DBWDxLQF6DMlwsZUXCO+KqSlBF9FsQK+YfLOG3LZhHxJm+Yni52d15U8+pWmptfg WVRfrXcl906XHGeLARLc+ME0Gxr/6pLKLXt0KWW5qiKnoTAXRQJjbvPxaKraLIDLMOcw h7ZhZXUwFZFBF8r+ZwIkjy1m9PnkxAUOyB1+ZPS4doxNsx95lBABAOzgMSYpipjSkHxW zS3Hh/1ZjbAIpQhSQqRpaDoCxNwWQuipxhU5S/iW7/fUrYNAe9tQXl0/wIauWJyHGpDA MVCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :message-id:user-agent:references:in-reply-to:reply-to:subject:cc:to :from:date:mime-version; bh=d86pac48CgMX9IRyv3AfcQ71cREbm/aex8zFxlt+z0A=; b=Yk3XNzo4LhDjs+VV6oeuVeoGPyGEl/JDOr7LC+jZ/VvQDfhOEdcTAr/e796DNs7Mhp sQ+E7YAZu/v8urTeV7fAFpJ/izHjqwSBPhT/OOpnscvP+50ZfEe21Z/Mf/QZ1If3XJxI egC6jZZHXvH6I176PNGryFwYRchKPO7lK0RI9p+pIVZLjEtkbGQywy4XCk84Edq88j/Q 0ngEcyPm+UE5syLAnhQ7Q1M1rDSbr4iHzF9QeQQXyIYwRwGId1Orzd7uh89agmfFIH6H /53mf7/9nedZV2Gu9I+K3vb6b0n3l/YY5shMGvFnUV42iF6LCx4D6p96gfrTC0rBQQ9X n+Rg== 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 g10si2856515edj.368.2021.09.30.01.27.17; Thu, 30 Sep 2021 01:27:49 -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 S1348234AbhI3Gi1 (ORCPT + 99 others); Thu, 30 Sep 2021 02:38:27 -0400 Received: from protonic.xs4all.nl ([83.163.252.89]:41594 "EHLO protonic.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348034AbhI3Gi0 (ORCPT ); Thu, 30 Sep 2021 02:38:26 -0400 Received: from fiber.protonic.nl (edge2.prtnl [192.168.1.170]) by sparta.prtnl (Postfix) with ESMTP id 244CC44A024E; Thu, 30 Sep 2021 08:36:42 +0200 (CEST) MIME-Version: 1.0 Date: Thu, 30 Sep 2021 08:36:42 +0200 From: Robin van der Gracht To: Geert Uytterhoeven Cc: Miguel Ojeda , Rob Herring , Paul Burton , 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 Subject: Re: [PATCH v6 14/19] auxdisplay: ht16k33: Move delayed work Reply-To: robin@protonic.nl In-Reply-To: <20210914143835.511051-15-geert@linux-m68k.org> References: <20210914143835.511051-1-geert@linux-m68k.org> <20210914143835.511051-15-geert@linux-m68k.org> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: robin@protonic.nl Organization: Protonic Holland Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Acked-by: Robin van der Gracht On 2021-09-14 16:38, Geert Uytterhoeven wrote: > 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);