From nobody Thu Dec 18 19:04:08 2025 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 BE3C426280C for ; Mon, 24 Feb 2025 17:30:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418225; cv=none; b=kLE+mE73CdObvezyIb+QtvhFMXbQB2RgpPtwgalkpTzBYJVnlu6MkgotQ3+cySd+bFRLylGyl/epJnV+eJr+OvTmXTiK4sGhA7xs+N0lno2HPyOdPJnUS0SdGjUdYWou2ABhW7yRIGwBuleFeaZ/3UNr+r8aumc+z5hBMmEx1Bs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740418225; c=relaxed/simple; bh=Jo/jEPORP9FRu1+CGCAN4WHZILUMw23E9Hkh6SQ6GAw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PkNLjwI44FSp9QR0gB6u0eufd++/qojkO3GEptopOkZBRWiu0a2wtRylHONLW+g6qw7kAcO2iOiTKD1z4X95KUvBm7PoTWRFFDIRwgDZY+Wq6NkukH0CoAhhS4bAHJSJ4uyeuqxmw1K0JUWJGvl6Uqqh0j+rX2wrVvPsg4WiJr0= 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=G01nFzkf; arc=none smtp.client-ip=198.175.65.16 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="G01nFzkf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1740418224; x=1771954224; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Jo/jEPORP9FRu1+CGCAN4WHZILUMw23E9Hkh6SQ6GAw=; b=G01nFzkfganpiFInFUCFBXu/IVFedAqtockEQZrzmo/qApmabE/+kqus GSQjm2nZs8HkeV7cCxmaAJrh5jtp9xgz2aFIIIV1dDxPTQvyzjgGHz0Nr 3rMByyXtFMqQRy0E3I+AaVLHrM2/eJrJd6uDCUqywI1C9EbozMvhJONnu +olMJv1k+C69Jfy9baYta+Wj68uzGkm5yXRT7V969dnSoQfis9fV4kUJ1 LBQ8SOzHfa3nsJ7SDyuDkAYrdj+06WiQhhjRN7UjANts4xVc2BS3uuxFy gzCvHiqgbpaN6NZGro1crtA6sCpd1Ai+ryZ6wlDNu6isYjFWako2wMSEF Q==; X-CSE-ConnectionGUID: j3z98rbCTj2TV4adf4C9fw== X-CSE-MsgGUID: lP3iRHkCQiO9vc1sdBCgZA== X-IronPort-AV: E=McAfee;i="6700,10204,11355"; a="41307942" X-IronPort-AV: E=Sophos;i="6.13,312,1732608000"; d="scan'208";a="41307942" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2025 09:30:23 -0800 X-CSE-ConnectionGUID: DD1irL4zTWK4DPfuI5bslw== X-CSE-MsgGUID: VXUCcxLqSISgYO/QGnQMVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="117027888" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa008.jf.intel.com with ESMTP; 24 Feb 2025 09:30:22 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id DEF3B172; Mon, 24 Feb 2025 19:30:19 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Geert Uytterhoeven , Willy Tarreau , Ksenija Stanojevic Subject: [PATCH v1 1/7] auxdisplay: charlcd: Partially revert "Move hwidth and bwidth to struct hd44780_common" Date: Mon, 24 Feb 2025 19:27:38 +0200 Message-ID: <20250224173010.219024-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.45.1.3035.g276e886db78b In-Reply-To: <20250224173010.219024-1-andriy.shevchenko@linux.intel.com> References: <20250224173010.219024-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: quoted-printable Content-Type: text/plain; charset="utf-8" The commit 2545c1c948a6 ("auxdisplay: Move hwidth and bwidth to struct hd44780_common") makes charlcd_alloc() argument-less effectively dropping the single allocation for the struct charlcd_priv object along with the driver specific one. Restore that behaviour here. Signed-off-by: Andy Shevchenko Reviewed-by: Geert Uytterhoeven --- drivers/auxdisplay/charlcd.c | 5 +++-- drivers/auxdisplay/charlcd.h | 5 +++-- drivers/auxdisplay/hd44780.c | 2 +- drivers/auxdisplay/lcd2s.c | 2 +- drivers/auxdisplay/panel.c | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 19b619376d48..09020bb8ad15 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -595,18 +595,19 @@ static int charlcd_init(struct charlcd *lcd) return 0; } =20 -struct charlcd *charlcd_alloc(void) +struct charlcd *charlcd_alloc(unsigned int drvdata_size) { struct charlcd_priv *priv; struct charlcd *lcd; =20 - priv =3D kzalloc(sizeof(*priv), GFP_KERNEL); + priv =3D kzalloc(sizeof(*priv) + drvdata_size, GFP_KERNEL); if (!priv) return NULL; =20 priv->esc_seq.len =3D -1; =20 lcd =3D &priv->lcd; + lcd->drvdata =3D priv->drvdata; =20 return lcd; } diff --git a/drivers/auxdisplay/charlcd.h b/drivers/auxdisplay/charlcd.h index 4d4287209d04..d10b89740bca 100644 --- a/drivers/auxdisplay/charlcd.h +++ b/drivers/auxdisplay/charlcd.h @@ -51,7 +51,7 @@ struct charlcd { unsigned long y; } addr; =20 - void *drvdata; + void *drvdata; /* Set by charlcd_alloc() */ }; =20 /** @@ -95,7 +95,8 @@ struct charlcd_ops { }; =20 void charlcd_backlight(struct charlcd *lcd, enum charlcd_onoff on); -struct charlcd *charlcd_alloc(void); + +struct charlcd *charlcd_alloc(unsigned int drvdata_size); void charlcd_free(struct charlcd *lcd); =20 int charlcd_register(struct charlcd *lcd); diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c index 9d0ae9c02e9b..1d67fe324341 100644 --- a/drivers/auxdisplay/hd44780.c +++ b/drivers/auxdisplay/hd44780.c @@ -226,7 +226,7 @@ static int hd44780_probe(struct platform_device *pdev) if (!hdc) return -ENOMEM; =20 - lcd =3D charlcd_alloc(); + lcd =3D charlcd_alloc(0); if (!lcd) goto fail1; =20 diff --git a/drivers/auxdisplay/lcd2s.c b/drivers/auxdisplay/lcd2s.c index f831ce762508..d573d36e3067 100644 --- a/drivers/auxdisplay/lcd2s.c +++ b/drivers/auxdisplay/lcd2s.c @@ -310,7 +310,7 @@ static int lcd2s_i2c_probe(struct i2c_client *i2c) if (err < 0) return err; =20 - lcd =3D charlcd_alloc(); + lcd =3D charlcd_alloc(0); if (!lcd) return -ENOMEM; =20 diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c index 6dc8798d01f9..4da142692d55 100644 --- a/drivers/auxdisplay/panel.c +++ b/drivers/auxdisplay/panel.c @@ -835,7 +835,7 @@ static void lcd_init(void) if (!hdc) return; =20 - charlcd =3D charlcd_alloc(); + charlcd =3D charlcd_alloc(0); if (!charlcd) { kfree(hdc); return; --=20 2.45.1.3035.g276e886db78b