Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1300968rdb; Mon, 19 Feb 2024 10:24:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWeG7VyqVBuiKY1a185+WFPkmGb8i6qRgB8pklVHMVB4npRPtkHkkthtsczXiAaSkhTpX6WKfmLOxptGkEh4z3lX+Cg2oE8batKrYEeaw== X-Google-Smtp-Source: AGHT+IGj7DxSr8XGjIWg+bqoWTZ0MoQLs8CF+SUW5CMDQl2SpJnzRlXa4mGIb/NJDsMVTMxlmn0i X-Received: by 2002:a05:6a20:a999:b0:19e:c32f:35d6 with SMTP id cc25-20020a056a20a99900b0019ec32f35d6mr9545134pzb.19.1708367093265; Mon, 19 Feb 2024 10:24:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708367093; cv=pass; d=google.com; s=arc-20160816; b=jvodytNo7LN0aQJSR0S/5kZUoCpgfGkAzhu42V3SvZ+qtaj3CM7xJrtc/nlEQ6EfUR +u3l46jZLAT0iXkDbr3EU7ZxIEKHmXlDJNMWJsp8MtR/MtZmrtQL0yNxLpZyu4RgmbYw GUZ6WRR74RZHWkFu7NuWKL2mCVWthf/HIiztcWosazDBtgmN9g8iCtjV9XywQ+MSbvhC 7pE2STEB1hyA92fFDZTKSVDx2eJRtIeLsJX64DjZPsF1S2eQzd6+loCV+FxbQK5p4s3/ CiMv6vZH15aiuOVhh2F5mvU73Y5ux5PRLBYfgpuoZYVl4Y3UciyNtcrZ7D2vC5/chPpr 6djA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xeaqGek5Qv86JTQ3Wd/kiIepESlyyeV2wOfNWjudo1M=; fh=dqy4saYl98vaBioBitW8P99YvD9vNvqzqRubV0LdUlg=; b=iWUFtx3BB3XyCV88yYOlS6SsFTVBVqetlXwdWUuh+4R/pZgDtuW1/xcqS9hsWZKvRQ Mk1DHeawC/MgMYBF3l3SLcNtUqidcZid6LmhAc8YhqRPTY7n5dF4enxN/nSMjecpi4wL RXRn8rIySaPk25jJ5AwgETOYx4V5iJbjX/fdmixzxZGJl7EZVB4qMchul+dDEkL0PC+4 Vnp0fLWkC5mz46L3cj+371uH3uJbIQQDc9c3AKzCGvxXLcUoc5CEyAy+enqDwuv/62AN zL0uGlJJTTr4zH+9yJMv0CQDjBiAOrzd3A0tpxFOV9vxtmb56YRwAnkItY3tNgQwTJ8y 7GMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=geU7p5P0; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-71733-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71733-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d12-20020a170903230c00b001d71ef5d315si4905134plh.339.2024.02.19.10.24.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 10:24:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71733-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=geU7p5P0; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-71733-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71733-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 717932852BC for ; Mon, 19 Feb 2024 17:05:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44574481A7; Mon, 19 Feb 2024 17:03:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="geU7p5P0" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C561445949; Mon, 19 Feb 2024 17:03:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708362233; cv=none; b=ciJ7F9FGB2zt0V+x91LTm2q/Kxrcb2t3pgcQ8uO8f1bxnIRMPEYwHWtVfMTi7G6bx31wgzyDSP4U0PmkKprD3KkhErxGiDGimzXJYTqXvNIHqazWNOocox+KEfpC86Imc2YyAuj2+iauK7hVwySNyXbLFsdMNkTLoLDcY7OzbeI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708362233; c=relaxed/simple; bh=WXC5x/5xpsIn2kxjIiHl+pWHnAC7qY7YPJf9uH9AyEE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n/xM/UXhmLltQRNZ8ndmRdjlkXkUNieU8fJxoLot7PEeuxeygfZ0Rt2VsM0OwX79qnwWr9afN9Q7qlpWyyzSCNXYgxoMElG9L1/h6K1Ah3jd78sM++VVcxgN7M53KePiT2dqp1B8VSoRwmdVcVW5js6VQh0h1/mIKjzwyRzX64Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=geU7p5P0; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708362232; x=1739898232; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WXC5x/5xpsIn2kxjIiHl+pWHnAC7qY7YPJf9uH9AyEE=; b=geU7p5P0zG7fRQOH5nxDPNckY5X5Sz0mU/ot44VerWOgR5rzxKzTCqYP LhlEU2/B1RKvFkYIhOCCgDfIchPuGjWOCcpm8d19Vr/WQxMZXu2o8jJwu ac6MSm4PaUoR8r1YYcGArZedj6j0f8aGdFtBkWwutVlzKwrpp+Tef4vFZ LmYPL/zEgoWVanGUyytQQiF1tPn//1br67I98NT2ID1BaH+dlGT4qvf3o TKhZWl9+uDKmebvNLfoAqpUe+qNHnxzA9hU1SWdVW/kSM+QwnFfgtTTB9 UCzRXcZyFJVaaBR5GSI/8mwggk+wnQdqNw7sW+f+2mUi59lart6dfrdDN g==; X-IronPort-AV: E=McAfee;i="6600,9927,10989"; a="2577442" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="2577442" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 09:03:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10989"; a="936315370" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="936315370" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 19 Feb 2024 09:03:46 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7EB47FF3; Mon, 19 Feb 2024 19:03:41 +0200 (EET) From: Andy Shevchenko To: Krzysztof Kozlowski , Andy Shevchenko , Geert Uytterhoeven , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robin van der Gracht , Paul Burton Subject: [PATCH v3 7/9] auxdisplay: ht16k33: Drop struct ht16k33_seg Date: Mon, 19 Feb 2024 18:58:06 +0200 Message-ID: <20240219170337.2161754-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240219170337.2161754-1-andriy.shevchenko@linux.intel.com> References: <20240219170337.2161754-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The struct ht16k33_seg is repeating struct linedisp. Use the latter directly. Signed-off-by: Andy Shevchenko --- drivers/auxdisplay/ht16k33.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c index 41a961342dc3..96acfb2b58cd 100644 --- a/drivers/auxdisplay/ht16k33.c +++ b/drivers/auxdisplay/ht16k33.c @@ -86,10 +86,6 @@ struct ht16k33_fbdev { uint8_t *cache; }; -struct ht16k33_seg { - struct linedisp linedisp; -}; - struct ht16k33_priv { struct i2c_client *client; struct delayed_work work; @@ -97,7 +93,7 @@ struct ht16k33_priv { struct ht16k33_keypad keypad; union { struct ht16k33_fbdev fbdev; - struct ht16k33_seg seg; + struct linedisp linedisp; }; enum display_type type; uint8_t blink; @@ -110,7 +106,7 @@ struct ht16k33_priv { container_of(p, struct ht16k33_priv, led) #define ht16k33_linedisp_to_priv(p) \ - container_of(p, struct ht16k33_priv, seg.linedisp) + container_of(p, struct ht16k33_priv, linedisp) static const struct fb_fix_screeninfo ht16k33_fb_fix = { .id = DRIVER_NAME, @@ -417,9 +413,8 @@ static void ht16k33_keypad_stop(struct input_dev *dev) static void ht16k33_seg7_update(struct work_struct *work) { struct ht16k33_priv *priv = ht16k33_work_to_priv(work); - struct ht16k33_seg *seg = &priv->seg; - struct linedisp_map *map = seg->linedisp.map; - char *s = seg->linedisp.buf; + struct linedisp_map *map = priv->linedisp.map; + char *s = priv->linedisp.buf; uint8_t buf[9]; buf[0] = map_to_seg7(&map->map.seg7, *s++); @@ -438,9 +433,8 @@ static void ht16k33_seg7_update(struct work_struct *work) static void ht16k33_seg14_update(struct work_struct *work) { struct ht16k33_priv *priv = ht16k33_work_to_priv(work); - struct ht16k33_seg *seg = &priv->seg; - struct linedisp_map *map = seg->linedisp.map; - char *s = seg->linedisp.buf; + struct linedisp_map *map = priv->linedisp.map; + char *s = priv->linedisp.buf; uint8_t buf[8]; put_unaligned_le16(map_to_seg14(&map->map.seg14, *s++), buf + 0); @@ -662,14 +656,14 @@ static int ht16k33_fbdev_probe(struct device *dev, struct ht16k33_priv *priv, static int ht16k33_seg_probe(struct device *dev, struct ht16k33_priv *priv, uint32_t brightness) { - struct ht16k33_seg *seg = &priv->seg; + struct linedisp *linedisp = &priv->linedisp; int err; err = ht16k33_brightness_set(priv, brightness); if (err) return err; - return linedisp_register(&seg->linedisp, dev, 4, &ht16k33_linedisp_ops); + return linedisp_register(linedisp, dev, 4, &ht16k33_linedisp_ops); } static int ht16k33_probe(struct i2c_client *client) @@ -756,7 +750,7 @@ static void ht16k33_remove(struct i2c_client *client) case DISP_QUAD_7SEG: case DISP_QUAD_14SEG: - linedisp_unregister(&priv->seg.linedisp); + linedisp_unregister(&priv->linedisp); break; default: -- 2.43.0.rc1.1.gbec44491f096