From patchwork Fri Feb 9 23:27:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 199231 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1345292dyd; Fri, 9 Feb 2024 23:44:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IG10BEKYNuxqMx/kXTfRFR7KcuIX30DLBNyt8etWerYVik8+vuG2xOI2XQnM1Zmyct2v2k/ X-Received: by 2002:a05:6870:6589:b0:219:9945:703c with SMTP id fp9-20020a056870658900b002199945703cmr1826569oab.50.1707551046110; Fri, 09 Feb 2024 23:44:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707551046; cv=pass; d=google.com; s=arc-20160816; b=wrFi13cZKUy4oPOUwB9B0g7Jb4rmAC98QPNFPAzs9UtLyu1auhP3dczZ5tNDX9lZBH /VBYG7gQ7DOxo9RKETfUFDju/VYO6v7pPHC06hfAsm0+hHeDI6XRQx86tdxDF4uiF7vM UHLkiOXfSk2eWy0qcMgEebC5fdGt+aA4plOJScqHeudRRqLbEdevY0+YCuCOeLELnHPX RqOhhN0zp4rViv3DgbEiWd0eojEFnkqNnNbt+vKS///NSb+yAJ7IxYXH8Pmie/jMPsXP NZ4TUfoxHWSBKouKZWY3i+djseIEF2njMurE8fOdar8WzPnZvEa7frE4FFXaq1zWtDmQ s9iw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :dkim-signature:from; bh=+BKEK4TZGi95ukxVkTkUsfUXe8VY89KvOv3l4m85x1o=; fh=nMF8Z+lQnw6UEggzuHbTL0Ftj/yahwOJ9cZ5QPhqGUs=; b=xUnajTLfeGzsp2dnZoC5NQPbZVH7hKJ6sE955Lx26YJIiT1ohvx9t6qfGKANjLvhQ4 E0qFEpk220uQzWhJiAL39sf2+6w9Zln18Uv2/RrYEx3G7pG+1aO4DTHHOks5ElUYZvTC BXNkXnvE4NUZ/K3E6XpmAFvRU9mPDzz+cFgCnaRa+jECquMDZ90XaO2Z9MkxkeD2888t ajxvbnGE+8G2PzxHOH8w/KATPJHGMW5DsnIIPjBGr3BMZ/41qHNXJUoUuypANmm2uLhJ YPDFsGq3PhYIfxg3VCPkGYyaO/ngL6WSonaCtlDIkOp1hd2QFeBvRDMHfxBdo/Bcv8KK m4sQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=MXCyppf6; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-60148-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60148-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net X-Forwarded-Encrypted: i=2; AJvYcCXv/xTIRZSsWAn2cfICFrGLQh38YBlj0ms4Xd5xsvdVxVKMMlglYMilLpsGF7x7DUEcQkGdbwQjIZu+aX0j8MZ0I0SYQA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t22-20020a639556000000b005dc4ec48cb5si3131683pgn.641.2024.02.09.23.44.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 23:44:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60148-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=MXCyppf6; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-60148-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60148-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7DFA728AD2E for ; Fri, 9 Feb 2024 23:27:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 162F538FB6; Fri, 9 Feb 2024 23:27:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="MXCyppf6" Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) (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 580B916439; Fri, 9 Feb 2024 23:27:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707521252; cv=none; b=ae2v557ERTiCCRfZyC4RSgDMNtVJbhjaambLUvC4eY51uGHjyghsdSgr6DCqFOJYVmLB0wWHLVIAasBj0pSrgj07bRobJ0JOe1cRNJHN+5hk45OCeYmuK/GATkv78DlyIV0H9U4sup2ErR23ah2zcsPg0gEksN4Uv8eF18B5Zjs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707521252; c=relaxed/simple; bh=kCLT7qokmuFY/CFxh4tmc+PM1+RtP1qfIzM12mWcNj4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=scd/wsCdlFDKoPjnBrpF9VZekUQgkx+2R7BgT8dbGkRW8KW+3h34SytNBMcidydy+c2ir/F4rJgAbrbSvgnH15BCmzlp8v4ds+oi8L9vpYdd29Nh6V3LIfnMy8fLDKsQSD7tDdMgxFL4Weyry7YnSc+tISpzw8mtvsNrOZdPhCc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b=MXCyppf6; arc=none smtp.client-ip=209.85.161.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-5957ede4deaso926983eaf.1; Fri, 09 Feb 2024 15:27:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707521249; x=1708126049; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:dkim-signature:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+BKEK4TZGi95ukxVkTkUsfUXe8VY89KvOv3l4m85x1o=; b=NfdwsqNEUVG/5TsZWN/JXKVpuzRvblvw5bMTI0J+l/jFWCP7FjEyAL+9FVyJZghUDB d5UCitORogl+S9u8G4QfqU3Qk5rCdAS/A7afRagAcWsxX+PvkII2hBNfKKCY+KmjyZgw Ro/qzU5nQ32KLyaks9DtGnjOTMdIJ987SK7i0U/oZy46sWdZhj0/R6O9rOBywYj8bcJN pTGoo9RzYz6nsgsicO4EYNuiu3UTib1ElHsv+sYB7Kd2opBetXt8GKUgi4brsYFt1v0C 0l//6vUZdunWYg+U6IIb2OOyoYuW6FRanhayulnltdV9hzpdikGYGNlcAfMcSOKTsY/t HvQQ== X-Gm-Message-State: AOJu0YyMUzM4hJWNGyQb5hlz6uJPMJ8aOUjkzurYEw9l4xWT7zu1ACQY LEm2wlNXP9RroYN4+RmV3tckV4fi1ti1eZGi4Xqx8/3dr7hxLyfA X-Received: by 2002:a05:6358:2607:b0:178:fe3e:1e35 with SMTP id l7-20020a056358260700b00178fe3e1e35mr1356333rwc.13.1707521249339; Fri, 09 Feb 2024 15:27:29 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWoZ40mXUi8fJ6bV5qepCv4c0hvB7se4/czJO3foYUN5RToOO1Vl2/na2xT3hIuzp9V+XfsHz4QAwesHfi1abx9zDQSujGuHKVOEISVUF8JoHGvA24zSbHVeRJGmo0LjbcFGNiDnFA6iA== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id n26-20020a638f1a000000b005d7994a08dcsm2349359pgd.36.2024.02.09.15.27.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 15:27:28 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707521246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+BKEK4TZGi95ukxVkTkUsfUXe8VY89KvOv3l4m85x1o=; b=MXCyppf65CxfWZMJtWrLN4huAvuE/ySVy6TYTNv115995hjO/Jx/ujJ+GQivDwxMBzUmem 5BJDUchSUG46x6R9m864p2Pj46+fJl0lpZ+iQd5OoD9C273d6XwcW98P752DyH6XrEFVaw KlR/SJxQZAJjWLVswf+iLCsPy7jIpGFwsEdODaof5zqJ5Xo0hJCKrodUBydgwhnYfTMQP/ UJQDWYxLVFfp44jUE5PP5E+G75YRkLkLco0Zj4UDupQ3V43qdL76e7fFc+cQLP6daCk0iz j58n8NgjBIl0KmNCHTYP11goGa9lXQmJIyhLI97Z+SHyIOwbwminK4hyR4oLlA== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Fri, 09 Feb 2024 20:27:48 -0300 Subject: [PATCH] media: bt8xx: make bttv_sub_bus_type const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240209-bus_cleanup-media2-v1-1-8037c73bf688@marliere.net> X-B4-Tracking: v=1; b=H4sIAPO0xmUC/x3MQQqAIBBA0avIrBPMIqqrRITpVANl4WAE4d2Tl m/x/wuMgZChFy8EvInp9BllIcBuxq8oyWWDVrpWWnVyjjzZHY2PlzzQkdHSVA22ZWNnqxzk8Aq 40PNPhzGlDwua8/5kAAAA To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1807; i=ricardo@marliere.net; h=from:subject:message-id; bh=kCLT7qokmuFY/CFxh4tmc+PM1+RtP1qfIzM12mWcNj4=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlxrUBcElFvq0oGUo6//Irgo8tU4js8sFamcYLu elBwHTEtTWJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZca1AQAKCRDJC4p8Y4ZY pq6qD/wIkkdl2Y4lktcyIsZbG3rG4nJH7ALJYB1a4vFJaWCsgN9B6VsWPtgrCPOVjAvZGt3mUx9 0xZKioKaNoyUB6WbG0z9vsffno1dpVuZJ6l82n9CRDcO2b2ASNe9bxxRvyjdVFMVZXdB6PUKN1U sjF38D4QMJ+2dfEnVfoigplVP25qpf3F0XOTdBA/x3w8f/jusCM2DhlWiozC1YahS6Geg6WihH0 FOY1hC27XkMzSd2GmeE+72pmxnJYiBxMBLHyrvXZePJNROgz32RAcoS7FwLYM1btQxhRgI3wjjc LZz1zIBZ6pVAZ1+LFs9VDO9Oid036aphOBmsCCfSerm0oOYv3YdDbN6JqssRVJ7zF9kFLlX9qfh CrwnPyodH2JM7I/+NbfAtyw2lvMWoEgRATReRmtr4LyJAcMHZVJmuaiLTTe1sb5mljHSgzfWp5l 2n/ji1L/ZV51Zh+bdPfOSRi09mhZwHDjpaXPQpKnGKcMFxZT8hxNsqvVsZ8HoKYVzlBMwIU/iVN G0c5vvizmlPrn582uq8krw/WJ3W5gxhs75EVw5dIP/HYDtpqgoz0wLPILgp8yVJ3wLszKVH8/g5 3+FMCci77/9tgGihsDoS7Z5ULFsgNykBEg8gJEEGmLSy7HwcBjjfFm1pVFHumCKnB8hOXe3hL81 xH+dPmTFp/rsHAQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790497045750245015 X-GMAIL-MSGID: 1790497045750245015 Now that the driver core can properly handle constant struct bus_type, move the bttv_sub_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Greg Kroah-Hartman --- drivers/media/pci/bt8xx/bttv-gpio.c | 2 +- drivers/media/pci/bt8xx/bttvp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- base-commit: feb8831be9d468ee961289c6a275536a1ee0011c change-id: 20240209-bus_cleanup-media2-a36e816cbc0d Best regards, diff --git a/drivers/media/pci/bt8xx/bttv-gpio.c b/drivers/media/pci/bt8xx/bttv-gpio.c index a2b18e2bed1b..6b7fea50328c 100644 --- a/drivers/media/pci/bt8xx/bttv-gpio.c +++ b/drivers/media/pci/bt8xx/bttv-gpio.c @@ -55,7 +55,7 @@ static void bttv_sub_remove(struct device *dev) sub->remove(sdev); } -struct bus_type bttv_sub_bus_type = { +const struct bus_type bttv_sub_bus_type = { .name = "bttv-sub", .match = &bttv_sub_bus_match, .probe = bttv_sub_probe, diff --git a/drivers/media/pci/bt8xx/bttvp.h b/drivers/media/pci/bt8xx/bttvp.h index 0368a583cf07..a534e63b9a37 100644 --- a/drivers/media/pci/bt8xx/bttvp.h +++ b/drivers/media/pci/bt8xx/bttvp.h @@ -234,7 +234,7 @@ int bttv_s_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *f); /* ---------------------------------------------------------- */ /* bttv-gpio.c */ -extern struct bus_type bttv_sub_bus_type; +extern const struct bus_type bttv_sub_bus_type; int bttv_sub_add_device(struct bttv_core *core, char *name); int bttv_sub_del_devices(struct bttv_core *core);