From patchwork Wed Apr 2 20:25:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 14036439 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 2D3621EB1AE for ; Wed, 2 Apr 2025 20:25:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743625535; cv=none; b=JQw32JJ8v1+TAkSotqxliTGQLPDGfl0pQyKLCXGKYSP4xRYsgoBDbK2yIaUHYzUyNISO0usKzBhfVDxHgyrD0Ulz35KlWHK2W/KhUwJOegmxv3b3mpiOXyvLZq32ib8ohF9U/QGoRFkGJcMdIAn80rfTOziUTszjaSPM2bqAqmw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743625535; c=relaxed/simple; bh=vJOovRwT5oBTlJtE96qNm/0UqugHRiAShonypF+q16g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VVJkC3/H6DJr040wroH+PXdLt0BE8GppQzyL+xqHpBo6pP9jMdQp7KOLJD5oUTwObdOQo1oGA0EhRrstM6iEekj1jaWX8SvWLUFnlAFHry1lhlodHShj2ucL9JfC6CSyN7k98uzDs2VNv+OInOfzo1aelDIxn/d1KJ1wjXGUTIM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=AjTll1GK; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AjTll1GK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743625533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CgikGdvC8j108bQE/mdQFjk6E8b6Q6tIt4AUZ/HzCuM=; b=AjTll1GKqEUkj0ApAEeA2ZV/2S2JeF8/UhIM4zanMhpdxecum4mCW5cQ17omxwImne7nal yc/vB7xvVALo2QaFbbh3ARwNZsllIVRnZjvmdXgCeL/iTg4vkrGzgHCob2xlI1jBDAZzln EC87BRhocbn697P982PtW4mGpJVWac0= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-590-vRDTGYVMM3mT9FJwsuLjPQ-1; Wed, 02 Apr 2025 16:25:30 -0400 X-MC-Unique: vRDTGYVMM3mT9FJwsuLjPQ-1 X-Mimecast-MFC-AGG-ID: vRDTGYVMM3mT9FJwsuLjPQ_1743625528 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 47417180899B; Wed, 2 Apr 2025 20:25:28 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.44.32.69]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D75FA180176C; Wed, 2 Apr 2025 20:25:24 +0000 (UTC) From: Hans de Goede To: =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Andy Shevchenko Cc: Hans de Goede , Dan Scally , Alan Stern , Sakari Ailus , Hao Yao , Bingbu Cao , Duane , platform-driver-x86@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH v2 3/9] platform/x86: int3472: Drop unused gpio field from struct int3472_gpio_regulator Date: Wed, 2 Apr 2025 22:25:04 +0200 Message-ID: <20250402202510.432888-4-hdegoede@redhat.com> In-Reply-To: <20250402202510.432888-1-hdegoede@redhat.com> References: <20250402202510.432888-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 The gpio field in struct int3472_gpio_regulator is only briefly used to store the GPIO in skl_int3472_register_regulator(). Instead just store the GPIO directly into cfg.ena_gpiod an drop the gpio field. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede --- drivers/platform/x86/intel/int3472/clk_and_regulator.c | 4 +--- drivers/platform/x86/intel/int3472/common.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/platform/x86/intel/int3472/clk_and_regulator.c b/drivers/platform/x86/intel/int3472/clk_and_regulator.c index 40434591dd0b..5f6c66215f63 100644 --- a/drivers/platform/x86/intel/int3472/clk_and_regulator.c +++ b/drivers/platform/x86/intel/int3472/clk_and_regulator.c @@ -261,11 +261,9 @@ int skl_int3472_register_regulator(struct int3472_discrete_device *int3472, int3472->regulator.regulator_name, &int3472_gpio_regulator_ops); - int3472->regulator.gpio = gpio; - cfg.dev = &int3472->adev->dev; cfg.init_data = &init_data; - cfg.ena_gpiod = int3472->regulator.gpio; + cfg.ena_gpiod = gpio; int3472->regulator.rdev = regulator_register(int3472->dev, &int3472->regulator.rdesc, diff --git a/drivers/platform/x86/intel/int3472/common.h b/drivers/platform/x86/intel/int3472/common.h index 72ef222629b6..e0fa34be8a07 100644 --- a/drivers/platform/x86/intel/int3472/common.h +++ b/drivers/platform/x86/intel/int3472/common.h @@ -80,7 +80,6 @@ struct int3472_discrete_device { /* SUPPLY_MAP_COUNT * 2 to make room for second sensor mappings */ struct regulator_consumer_supply supply_map[GPIO_REGULATOR_SUPPLY_MAP_COUNT * 2]; char regulator_name[GPIO_REGULATOR_NAME_LENGTH]; - struct gpio_desc *gpio; struct regulator_dev *rdev; struct regulator_desc rdesc; } regulator;