From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48F4837F8DA for ; Mon, 23 Feb 2026 23:41:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771890076; cv=none; b=setOiF0Saj5Og1NuhIL+FtubLAqlQmTigR6c4PGz3Ntf3o//e3CO08Ripx8ByU63qvrsMzQGZcwSAKtb5yb9PlK/qXPaDxdG5CDkzOIvVc2ajRH3jbSv2BOAwLVod3J6gVOiR+3Jt+bRywM16qn6zpTZOnLzql0KBLfsUyo03Pw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771890076; c=relaxed/simple; bh=5dyQAM6IPulAUhrvclETJjiYmTwjjWw3Y1o1DldlJaA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AwrAzdYGaWWz66u0r/4xOz4OKyDoveaWrFGmV9ERvmKi8dcMYsRYhiNCRVDfHaSM6MQPqpdV1qf0zeDbJjS1TrkRpT3qdN/bhl+rQ6KEDrSulS72UAmyTDw3qvkNa6ZWpLtPItHxYaJMGC7QLGm8ohRmTCGc9Yep+cMZ67ImCzM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FUTxeLLn; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FUTxeLLn" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-b8fbb24a9a9so853090966b.0 for ; Mon, 23 Feb 2026 15:41:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771890074; x=1772494874; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=ajc9uru2ZAYEp7H15z+ZpBl2mnUqL3fUnLNpXdHs2Xc=; b=FUTxeLLnA5bTMY2nnhqNG53tFYie+ooiOUPem+mifxV3fy58AhgjZONzGJQPjJgH8z 2cLZpoPpUND9xeIHNgDfrlsT2ukx1yR91E83Sv6ITJdr1ImBXGht7P+iKlEvoIWgRcST KIE71T3h8YAqvNcxRfgcMB+wypKIwR3JAaEtBWRLNUnFbfzj/vp9u+JFA49n44s6k5AJ vhv6iAwvAzMVS3uyqHY7AwrUOhtAVvydXRz0Vlv7k1CYTycaubSwuBAIxsB2/TzYLQFH nOOorDb3fqY77Y5ONVhHBKP14DGWBwinVdYJewthyzsdCNbsgVIksZKg5D67nLS+WYvS Z7WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771890074; x=1772494874; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ajc9uru2ZAYEp7H15z+ZpBl2mnUqL3fUnLNpXdHs2Xc=; b=dmZyx0Kfoud9b0B+BxZqvnksan6sAjH/uruONsjjp2f8gbK2te0wo4zW71HidpxwAH S2s80KhUomvL5PF9cmI4Vv39X+9XF7GV7S2Z0nTf9EyxLENM1Yh/1sTDYMLbtKAuM+L0 41oAPOQwDiJ9kPcryOTqcGQoYTCrCn4vhVQPVaP8eo8nI2yyGqsmWJrmc6SN7hewfSnG 8J6gPKeVoCeXqvOQpc5gk/IxwLPDqrvuwBdw3bf+BUbFGjU64rT0UCI8KIVXQfeI7dIN VZKYPhm8HZSutmgrNEaLpkjpt4dNcjBPODgJpZfdXAo1jc6cfIWTtHqKXhSuPufU5vUY UTRQ== X-Forwarded-Encrypted: i=1; AJvYcCVckk5CDC6oe9SkmI5xFCRwiPg8jb3hekrUMcD2JkrPaQy+znKY8qsqWhcMV4GIM6GUY5ZEr0TMOlUi6PE=@vger.kernel.org X-Gm-Message-State: AOJu0YwhLa12I9H66pmanyOQH1HG7xawEiYYwV5j/EASf4llZ1C2g5mD JfPwDfJxrHA5wZdnk+Bd7KYBNzb03P2vguJNTz1UL2ly/DZU92GA8UBIxfb13Q== X-Gm-Gg: AZuq6aIdiFztIgE8zVd/roo1252R2KF5RXSX52lY5Jrr/JqofPDfaYbHjaFH3SbSpIg +GD4xC+Vd75gIJVKaxZdPAbAd+zkatnsZ2mBH41NxuAQ2sVxj9h/AcJo/cBUwqyUuL+CznB5V5P fV5TKHPIvQzms1wtLEvhE2Mr+hs2bG1LDCmT03BIKtr2UIbAHhFwPLxWg57uhmto/UtKazr6UA7 NqdaWa+NShU4uopbsqM4JQJ//kottE9Q1VDqGul53mUM9TXgudeeCyUeeIi65U2ADYB/lJmqOQx i6rL8z9eLUB38onX0y/Asm5VUjYFDLPUrI53Bicbm0a354dWPCvnO07b00BMh5BSCXYqwGH/XS5 LnC3hGA3KaSc3qoS+Z0+x2OLsz/X2rjuWJILHnLCUgNpoaIAhFwSm2dmtdwmfFWNJYgGAD6Y6yw 7/toWhtZdtCarYoA== X-Received: by 2002:a17:907:7ba0:b0:b84:3fab:4251 with SMTP id a640c23a62f3a-b9081089408mr696042166b.15.1771890073435; Mon, 23 Feb 2026 15:41:13 -0800 (PST) Received: from jekhomev ([46.251.53.180]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b9084e8cb3fsm380362766b.48.2026.02.23.15.41.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Feb 2026 15:41:12 -0800 (PST) Date: Tue, 24 Feb 2026 01:41:12 +0200 From: Yauhen Kharuzhy To: Ilpo =?utf-8?B?SsOkcnZpbmVu?= Cc: platform-driver-x86@vger.kernel.org, Hans de Goede , LKML Subject: Re: [PATCH v1 1/2] platform: x86-android-tablets: lenovo: Add Yoga Book haptics entries Message-ID: References: <20260217233618.1324550-1-jekhor@gmail.com> <20260217233618.1324550-2-jekhor@gmail.com> <181e4409-7bbf-e207-0c54-1f817c1c35ed@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <181e4409-7bbf-e207-0c54-1f817c1c35ed@linux.intel.com> On Mon, Feb 23, 2026 at 04:26:25PM +0200, Ilpo Järvinen wrote: > On Wed, 18 Feb 2026, Yauhen Kharuzhy wrote: > > > Add drv2604l i2c_board_info for drv2604l haptics drivers present in > > Lenovo Yoga Book YB1-X90 and YB1-X91. Set properties required for device > > initialization and self-calibration. > > > > Signed-off-by: Yauhen Kharuzhy > > --- > > .../platform/x86/x86-android-tablets/lenovo.c | 96 +++++++++++++++++++ > > 1 file changed, 96 insertions(+) > > > > > > +#define YB1_X91_DRV2604L_0_DEVICE "i2c-DRV2604:00" > > +#define YB1_X91_DRV2604L_1_DEVICE "i2c-DRV2604:01" > > + > > +static int __init lenovo_yb1_x91_init(struct device *dev) > > +{ > > + struct device *drv2604l_0_dev = NULL, *drv2604l_1_dev = NULL; > > + int ret = 0; > > + > > + drv2604l_0_dev = bus_find_device_by_name(&i2c_bus_type, NULL, > > + YB1_X91_DRV2604L_0_DEVICE); > > + if (!drv2604l_0_dev) { > > + pr_err("error: cannot find %s device\n", > > + YB1_X91_DRV2604L_0_DEVICE); > > + return -ENODEV; > > + } > > + > > + ret = device_create_managed_software_node(drv2604l_0_dev, > > + lenovo_yb1_x9x_drv2604l_0_props, NULL); > > + if (ret) { > > + pr_err("error: cannot create software node for %s: %d\n", > > + YB1_X91_DRV2604L_0_DEVICE, ret); > > + goto put_drv2604l_0; > > + } > > + > > + drv2604l_1_dev = bus_find_device_by_name(&i2c_bus_type, NULL, > > + YB1_X91_DRV2604L_1_DEVICE); > > + if (!drv2604l_1_dev) { > > + pr_err("error: cannot find %s device\n", > > + YB1_X91_DRV2604L_1_DEVICE); > > + ret = -ENODEV; > > + goto put_drv2604l_0; > > + } > > + > > + ret = device_create_managed_software_node(drv2604l_1_dev, > > + lenovo_yb1_x9x_drv2604l_1_props, NULL); > > + if (ret) { > > + pr_err("error: cannot create software node for %s\n", > > + YB1_X91_DRV2604L_1_DEVICE); > > + ret = -EINVAL; > > + goto put_drv2604l_1; > > + } > > + > > +put_drv2604l_0: > > + put_device(drv2604l_0_dev); > > +put_drv2604l_1: > > + put_device(drv2604l_1_dev); > > This looks like a case that would benefit from using cleanup.h > (__free(put_device)). > > Remember to declare variables that use __free() mid-function as per the > usage pattern in documented cleanup.h. > > Please also make sure you have all necessary includes for using it (not > through some obscure indirect include path). A good point, thanks! -- Yauhen Kharuzhy