From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [195.130.132.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 AE25D84E0A for ; Wed, 10 Jul 2024 07:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.132.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720597503; cv=none; b=V805yBk/AaWmZC3iyq32n3iDHrXbz97Re7SPQ6LmTwL1ePGwXzPFANxBfRD13YOP8G2TNq8KqY4XEExMpwVGp/fGj4kwItJDoCh0hTFOyVejG2y9xzdZMu0B1ZjrHogoX5SEM4R8qkZkpYmv7932JGpRWKDDUDzodXg5unomNRo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720597503; c=relaxed/simple; bh=d/Jy8u/E1KSQfKo9JxGix6z0rwDf5U76cR/90Da840c=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=WBliTkmTzodKXViG64Ky5RDJhWJWM4pbTPAPGDUpeG+Ybn+LohBshQoTo/CAD18gRoI5Ah/AE2BGf1B07B1qp6D4nnzc3JKFLX0I3N95kHv7b6cBaFnbKycaO14d8iGoumLkUiUdVd2mM1SCMs4bvvJ1YSEsqCZcIyugZXjVP38= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.132.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed80:2340:18a1:4138:37d2]) by xavier.telenet-ops.be with bizsmtp id ljkt2C0024znMfS01jktRR; Wed, 10 Jul 2024 09:44:53 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1sRS0F-001b1I-Bk; Wed, 10 Jul 2024 09:44:53 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1sRS0S-00Bv7Y-Tp; Wed, 10 Jul 2024 09:44:52 +0200 From: Geert Uytterhoeven To: Greg Kroah-Hartman Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Subject: [PATCH] dio: Have dio_bus_match() callback take a const * Date: Wed, 10 Jul 2024 09:44:52 +0200 Message-Id: <20240710074452.2841173-1-geert@linux-m68k.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-m68k@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit drivers/dio/dio-driver.c:128:11: error: initialization of ‘int (*)(struct device *, const struct device_driver *)’ from incompatible pointer type ‘int (*)(struct device *, struct device_driver *)’ [-Werror=incompatible-pointer-types] 128 | .match = dio_bus_match, | ^~~~~~~~~~~~~ drivers/dio/dio-driver.c:128:11: note: (near initialization for ‘dio_bus_type.match’) Reported-by: noreply@ellerman.id.au Fixes: d69d804845985c29 ("driver core: have match() callback in struct bus_type take a const *") Signed-off-by: Geert Uytterhoeven --- drivers/dio/dio-driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dio/dio-driver.c b/drivers/dio/dio-driver.c index 2d9fa6011945d88b..12fa2d209dab9d3c 100644 --- a/drivers/dio/dio-driver.c +++ b/drivers/dio/dio-driver.c @@ -110,10 +110,10 @@ void dio_unregister_driver(struct dio_driver *drv) * and 0 if there is no match. */ -static int dio_bus_match(struct device *dev, struct device_driver *drv) +static int dio_bus_match(struct device *dev, const struct device_driver *drv) { struct dio_dev *d = to_dio_dev(dev); - struct dio_driver *dio_drv = to_dio_driver(drv); + const struct dio_driver *dio_drv = to_dio_driver(drv); const struct dio_device_id *ids = dio_drv->id_table; if (!ids) -- 2.34.1