From patchwork Sun May 16 03:48:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 439832 Delivered-To: patch@linaro.org Received: by 2002:a02:b78d:0:0:0:0:0 with SMTP id f13csp1582168jam; Sat, 15 May 2021 20:48:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeojsxUtmXSXafJl/sA0vXQm6yFvHclas0YG0H1fDzVbjjOcOQowCiD4o3C6b6/DqN6WXi X-Received: by 2002:a17:906:724b:: with SMTP id n11mr55707653ejk.338.1621136938598; Sat, 15 May 2021 20:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621136938; cv=none; d=google.com; s=arc-20160816; b=FrjNCf6vz98OtHWIhg3PNRYa1GAR/b2XTOdHUGY3AN9C1uPAhNFqDA7vCTCxSdqgHi o1ww6fLJYFJVADFDkFPCHe3gL4d0xqHQuKx+O9x8Y0bQBiwPeSWZ4WVuIO96VsJ7vULG CT6gRegezYo+y8qA7jVkvnLSmk2TjvcuNOxErGKtLnK/zXiYPPomIZcxUHLgLhGz7aMm UkX7H28tXflPJO/L37uUn0YrgOePJE2Uq8PLTtVi96fD5WI4cRtJz5h+4KLeuws4bqv2 xMVbowAAevPQhCD/265d+iFpg8UjW3y0grWNM/fYWh+KcSwMGTkZVcxPbolIuIvMwoRZ 8NKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=OhSuvbBg5gouj0NE7hl4DXAk820cn3WTuep5FOuXDwc=; b=dRh6qsEnBw57iw1ytiZ0pOKfouomhwCyds++8asWmKKmikToFlZL13Ik6bFVD9+bVO S81vC1sDG0d2jpSbt8YboYkmoN8oluNKzBOGGX2Sj5n/bhIggvGwxedKcCD01bPMPXVz nLRzEiM2G+GWRXvPh1cXC0cXDQJNoGZ3ex31mtqNuaQXQowtAz2Pg5HBh2pGwZWJ3I43 j5dJsBFt8DGYu0okBgoGltwAPSWiJlg9iTz0PtA/9Im509/YG6ZcwUUu57Qeh3GcyBA3 rRCpFUNdzRqHPyOOj/3xa0De6VOOwqU77UhfisxQbaWMKYZ3hdaop5ROTt85S9cpKqHg 6LoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lkZxtWoE; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si10224426edi.208.2021.05.15.20.48.58; Sat, 15 May 2021 20:48:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lkZxtWoE; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232478AbhEPDuF (ORCPT + 4 others); Sat, 15 May 2021 23:50:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232432AbhEPDuF (ORCPT ); Sat, 15 May 2021 23:50:05 -0400 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 401C9C06174A for ; Sat, 15 May 2021 20:48:51 -0700 (PDT) Received: by mail-ot1-x333.google.com with SMTP id g15-20020a9d128f0000b02902a7d7a7bb6eso2755783otg.9 for ; Sat, 15 May 2021 20:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OhSuvbBg5gouj0NE7hl4DXAk820cn3WTuep5FOuXDwc=; b=lkZxtWoEjjiosjTeDSf4x3x9LrI+RVU2xKtvHK+igcsoDCFKplXu+Ri92PWCej7FD2 vLkJ3Uv0hjZGbAoShkD+zgDIbMM6Ylu9prE3RoStAEcHY94pzxo8+qgV0GMyXPgeW604 jz//XMdatYIawZv5H1x90QQVFViruQBPcb82xLFVd71KzOQX8muETHUqmBCarZqOmBzK MSBkgRdS6mcMk++RwG0CgzKdWPWw9KEhAtlyjZOLEupuYNmLdR973mDPvY0sMucfnl5D Q9LoSqhw+tNqATp1edBIBhxAO4WGxWWLXbSubAuTKT2eZmbg6+Sz8OfzJYJvI6hhFHw6 EBEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OhSuvbBg5gouj0NE7hl4DXAk820cn3WTuep5FOuXDwc=; b=ecdllGfDeKD5Aud4J34unwDtiBJwsamYllWr/6pQS35yJY2oxOeDNqj7EY2c3hTYdo SWze5ZF4leLeJkkbG2LJwHGriFmnddffxBw7r8Hed5/Nur4EwGISfj+pcsxXcNz0jlcv k3dqxnYtPNf/RW8Pfipz6LGVbeybgTCNfMYxg5w/g5RRZm5CaAD2HAGs6Tz5wyilgMsF uZf7qDLmBB85hLr6DC+N9imWae/hAFv8mLh8+Y+dCURrAznXHvKUSK8UJly4txCF15yC imkIL/nCFQgTyYEn3Soq4T3Qd3C8At654jrIMkSTKX//IvUZUDboDz+ixmC3nggf1Dmr U3+w== X-Gm-Message-State: AOAM533uQ8oVll2KaIHhEL+b55Q0+28YoGUTOmcE5yYdSZUcxJFtm03Q imcANYUcwGMRBJRgxqdF4IDkFlBcqeRE/Q== X-Received: by 2002:a9d:6255:: with SMTP id i21mr42041532otk.284.1621136930641; Sat, 15 May 2021 20:48:50 -0700 (PDT) Received: from localhost.localdomain (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id u15sm613702ote.81.2021.05.15.20.48.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 May 2021 20:48:50 -0700 (PDT) From: Bjorn Andersson To: Heikki Krogerus , Greg Kroah-Hartman , Andy Shevchenko Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: typec: mux: Fix copy-paste of the container_of Date: Sat, 15 May 2021 20:48:33 -0700 Message-Id: <20210516034833.621530-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Some of the boilerplate code was copy pasted from the typec_switch and retained the use of the switch's container_of macros. The two structs are identical in this regard, so this change doesn't cause a functional change today, but could possibly cause future issues. Fixes: 3370db35193b ("usb: typec: Registering real device entries for the muxes") Signed-off-by: Bjorn Andersson --- drivers/usb/typec/mux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.29.2 diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c index 8514bec7e1b8..e4467c4c3742 100644 --- a/drivers/usb/typec/mux.c +++ b/drivers/usb/typec/mux.c @@ -45,7 +45,7 @@ static void *typec_switch_match(struct fwnode_handle *fwnode, const char *id, dev = class_find_device(&typec_mux_class, NULL, fwnode, switch_fwnode_match); - return dev ? to_typec_switch(dev) : ERR_PTR(-EPROBE_DEFER); + return dev ? to_typec_mux(dev) : ERR_PTR(-EPROBE_DEFER); } /** @@ -87,7 +87,7 @@ EXPORT_SYMBOL_GPL(typec_switch_put); static void typec_switch_release(struct device *dev) { - kfree(to_typec_switch(dev)); + kfree(to_typec_mux(dev)); } static const struct device_type typec_switch_dev_type = { @@ -239,7 +239,7 @@ static void *typec_mux_match(struct fwnode_handle *fwnode, const char *id, dev = class_find_device(&typec_mux_class, NULL, fwnode, mux_fwnode_match); - return dev ? to_typec_switch(dev) : ERR_PTR(-EPROBE_DEFER); + return dev ? to_typec_mux(dev) : ERR_PTR(-EPROBE_DEFER); } /**