From patchwork Mon Apr 29 13:35:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13646993 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2103.outbound.protection.outlook.com [40.107.7.103]) (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 2AE4F74C09; Mon, 29 Apr 2024 13:36:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.103 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714397779; cv=fail; b=Nsfe7ettFa7ZdOrJHU670qInesU8v6r01K+ZZjbzV7+mRpQoa3t2/BIGk7XSXC0j9mK4zmfdWat+1FvX8MAj6gbmcyVWOL5XiYqlxK/s3ua2YTh8RM8LXGC8qaEakP6y8Ps/3BnlxEW5DfZU27YOjng0AhIGJ8xE1yDIeLWw5Ik= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714397779; c=relaxed/simple; bh=q4UvIumVFP5q+c4yFcY/2fIewoFcwcIboWMu/T5kPTM=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Ut4ubtDhF1g+Kbz8Thm5swEAF64SG5nwqj0TRuqUmzE10V490nICQ25YXxyfwL4DeuQQ2TUQmwt/rBJaiNBNuzIpvVNzlT8fBpuS+1Au1v8BtpIdetyKeBLtlaRbQSG34Ay90UHbMVjNtX5R+mEBRz2jRJkeQXHVYBxnT/7kcgo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=uuI0Y/gD; arc=fail smtp.client-ip=40.107.7.103 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="uuI0Y/gD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iE9m1SZif8iFUztkUVkhLjRXzpPwv3fDs5lFaveBeEcPu3ZzryM1kqIu5YDucObZepNIQe035V5odEvrZPiZ6sAtvemCTAufarZ3AZHnwHSpVwOrA95DAzz8MS8shOZjpnmaNUAznhoITOYIqKaNFu6dnamI0tlIim1TsIi4lsLNw0ciqL1VGTyJ0Y+g1N3iIq+WyKxXXD5A7YPS4B5/4oR/Geh2eY1bAg1m3BYHL22C7IxQH2UmOl3h9z6mp/wSPndUePCkoR2yGP94lXJt/uVV90BUu61ZIH4uWvedpFgRskRvzSKT8bd+RNSgCcAwzhlwW2i/A+55WehmxmjSIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=utAkVU0RUYSHJMl20rCi1kQ8dNgRQicmHyxvIktcldY=; b=YgBvi3mcR1/HV2YmsaajUVqU+zG/hvmjjJ90O/rqmEX7k3VdYpmoKcVQ0gMlMZh0pdq0kZd6nh+RZ0aeIvAgHAzZpmJy40/izzSmXplQIDwrMOjxiPnQ9WuAdaawOMwTCzJnIa8PMXvHmzekqrrE0RhVRHT57c9PE9eKf7DU5Dkr6oMib5nApJg5WGSLZ19cSQZsDr7UNuYKfI8hjI9+8AGE1x/Y8rKSH1u+pNH2fHuGgKVilVA2ZCYvgtOxYSij+xdCkAWTWRawfzRqz9h1uuY85QJ5PZn7y+gqjYk6DA6P09Z5WsKij13dxdinoaLTOWpfIPCyY9LoV+ydRIuBSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=utAkVU0RUYSHJMl20rCi1kQ8dNgRQicmHyxvIktcldY=; b=uuI0Y/gDFFIMHL7wmNP5g6B9gixQYcd8q5sQk4bF4z5Q5kgd70Rn7769r4TyBUOjp70X9JU5+XMxx916UWn45EF1Ij1DE8fFBsg6ev2B5l3DqT+PA/Dt3VdZyTlo5w0+9KqZllWRINQvFhJbnslEeS3CAMdJeAHf3Nk0kB16KGM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by AS8PR08MB6087.eurprd08.prod.outlook.com (2603:10a6:20b:29c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Mon, 29 Apr 2024 13:36:12 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::6621:68a6:ab00:c040]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::6621:68a6:ab00:c040%6]) with mapi id 15.20.7519.021; Mon, 29 Apr 2024 13:36:12 +0000 From: Javier Carrasco Date: Mon, 29 Apr 2024 15:35:59 +0200 Subject: [PATCH v3 3/3] usb: typec: tipd: rely on i2c_get_match_data() Message-Id: <20240429-tps6598x_fix_event_handling-v3-3-4e8e58dce489@wolfvision.net> References: <20240429-tps6598x_fix_event_handling-v3-0-4e8e58dce489@wolfvision.net> In-Reply-To: <20240429-tps6598x_fix_event_handling-v3-0-4e8e58dce489@wolfvision.net> To: Heikki Krogerus , Greg Kroah-Hartman , Abdel Alkuor Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1714397770; l=927; i=javier.carrasco@wolfvision.net; s=20240320; h=from:subject:message-id; bh=q4UvIumVFP5q+c4yFcY/2fIewoFcwcIboWMu/T5kPTM=; b=ZZNF2iqO+9kezb5j0O2E1knqIkvkmF8v5qxtxlvmbrj2ylHO9CMDZHlh234dDEVS9xct+6VhX pa5yLtH6+ikCP+0V12VtpGyWLG1CFlgu6zjxnRDQJBCtX1BD0x7dy4R X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=Vxk2/0sGIxM8rsKnceszFuSuHVfQwa1Yo8+is7BX2nY= X-ClientProxiedBy: VE1PR03CA0005.eurprd03.prod.outlook.com (2603:10a6:802:a0::17) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|AS8PR08MB6087:EE_ X-MS-Office365-Filtering-Correlation-Id: 111cd21e-6f02-49a1-d541-08dc68515552 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|52116005|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?ACnntpcLY/lqUGdlE6HOJ8rKzCj9PGJ?= =?utf-8?q?KzYUQU8XjJ+BejjOt9mENtrQu6N4HLyOsmm7XSdTsqO+Eq/T6c5TVnI4PVod4Ods8?= =?utf-8?q?UiixAlTKaAAIbdBkgSUbzYMqSHaIENyVuv13V+cgFnvoss5uiwp2kA1Wm7DqIjPQq?= =?utf-8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= =?utf-8?q?0Zn5xzMTKqltkxET6vC4nnG+QFtNqjtrnDV798GflmVKHCzWKZs9NNbTiTbJQ1QoM?= =?utf-8?q?UVGYy+cRDr1QzavU2J+xk1PFozQeVhTt4S3ukxUVooE4y/FK9pz+V+pUqQg5T0s2N?= =?utf-8?q?2GXIX0r4gpBk/zwK2sir6oXUVbxv3IbmOL9cCV8A/dY9PQC7EBDy3/Lbz60v3nnw6?= =?utf-8?q?GBrvPaVebzc/v+KrONs9OFfiAkGmD8yyZES+GnnxCBeMxQwJ8DIoZR2135f3p8uRm?= =?utf-8?q?8J4x/w00u5ChxmnyhbizK1sY+AYg+yN3TPw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(52116005)(366007)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?92ctmBjfcNjLwfnpKSHFqxVpAJc4?= =?utf-8?q?WQ9jAx53qQvUURO65J0a3iE5WTkF9vZNQLhdceNW96LrbwjB4wY8I4Wdycq4jBbf4?= =?utf-8?q?HlhTzdVJoRPr0iJsyswwRONYxJjFBrh1wDDzwgFd0l/GzGXYHdqmLHKIBAKalNWG/?= =?utf-8?q?N9hTyGJCB7CsfomRb8AyXtEv+l5S79OFdnHdnKBoeUGTXGMle4HBTBhmSOq50yAIY?= =?utf-8?q?i03WQcBeqcdI2LzT1Ewt0DQ8g8Pojkt3hqZxqzX/8VHkMvA8voaAn0jh3au/kuxAU?= =?utf-8?q?NcSim2Bvxt7bONzlRowpD9qdayNEBim9dZ51Kbjkow7+kGFK9l/0+9XyQ1X5XqIoU?= =?utf-8?q?bW/ac01/94xhZlRoiUxnhPSS++5iVf+Tjdy75W74W18q46HjbfU/AjFEq/mf7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hJMLiV4ZyXqa?= =?utf-8?q?52OpXLbOVat13rCR2D4rTjhEwY1j7KcPgLWl/qcHVblZAW8EILEA3UwY//IuRHBLa?= =?utf-8?q?QZIAoc8aoH7zaTfE4xfAU6ujh9hnGoXiDZwZ39+uxTBHRp2ytJ5e9VQdc0Or5704Z?= =?utf-8?q?r/lxVd2idaeCTHNlQMyBLJXnje/tzdWbUvYKdFp/SciAJnBQFksL8WQEnlXXy4xP2?= =?utf-8?q?sqELxlySVpZCEW8daqkb16acwoYR85qUQALSTCGnP9dI1KWwsHaoHRg5k13/KoXvm?= =?utf-8?q?LzBz+nbvPcVj+KfzqRSOntllrl0wyElClOxJzDgTB6l4z5owUAnRb3A=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 111cd21e-6f02-49a1-d541-08dc68515552 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2024 13:36:11.4096 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZN2gDpkEJaPHEWGryp4Am9PHVgtP1P4bETuMaNbhBrSBVjgMQyG2Dvjxi3hRGJHCdVZcxmjCTnc7ln6LH9E8gUG0L62oj6JwIVbj71D065o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6087 The first thing i2c_get_match_data() does is calling device_get_match_data(), which already checks if there is a fwnode. Remove explicit usage of device_get_match_data() as it is already included in i2c_get_match_data(). Signed-off-by: Javier Carrasco Reviewed-by: Dmitry Baryshkov Reviewed-by: Heikki Krogerus --- drivers/usb/typec/tipd/core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index 191f86da283d..ad76dbd20e65 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -1365,10 +1365,7 @@ static int tps6598x_probe(struct i2c_client *client) TPS_REG_INT_PLUG_EVENT; } - if (dev_fwnode(tps->dev)) - tps->data = device_get_match_data(tps->dev); - else - tps->data = i2c_get_match_data(client); + tps->data = i2c_get_match_data(client); if (!tps->data) return -EINVAL;