The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] can: m_can: pci: Remove driver_data
@ 2026-05-11  8:49 Markus Schneider-Pargmann (The Capable Hub)
  2026-05-11  9:04 ` Uwe Kleine-König
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Schneider-Pargmann (The Capable Hub) @ 2026-05-11  8:49 UTC (permalink / raw)
  To: Marc Kleine-Budde, Vincent Mailhol
  Cc: linux-can, linux-kernel, Uwe Kleine-König,
	Markus Schneider-Pargmann (The Capable Hub)

driver_data is set to M_CAN_CLOCK_FREQ_EHL for all models. This change
was already five years ago, I don't expect any follow up models that
need to set a different frequency through the driver_data at this point.

Hardcode the M_CAN_CLOCK_FREQ_EHL. Once there are new models we can
evaluate what data needs to be in driver_data.

Signed-off-by: Markus Schneider-Pargmann (The Capable Hub) <msp@baylibre.com>
---
 drivers/net/can/m_can/m_can_pci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/can/m_can/m_can_pci.c b/drivers/net/can/m_can/m_can_pci.c
index eb31ed1f964491ab41c7811be317706a09951390..8cd235c4f85c5fa2fb0bf299c950619ab52e6d88 100644
--- a/drivers/net/can/m_can/m_can_pci.c
+++ b/drivers/net/can/m_can/m_can_pci.c
@@ -126,7 +126,7 @@ static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
 	mcan_class->net->irq = pci_irq_vector(pci, 0);
 	mcan_class->pm_clock_support = 1;
 	mcan_class->pm_wake_source = 0;
-	mcan_class->can.clock.freq = id->driver_data;
+	mcan_class->can.clock.freq = M_CAN_CLOCK_FREQ_EHL;
 	mcan_class->irq_edge_triggered = true;
 	mcan_class->ops = &m_can_pci_ops;
 
@@ -183,8 +183,8 @@ static SIMPLE_DEV_PM_OPS(m_can_pci_pm_ops,
 			 m_can_pci_suspend, m_can_pci_resume);
 
 static const struct pci_device_id m_can_pci_id_table[] = {
-	{ PCI_VDEVICE(INTEL, 0x4bc1), M_CAN_CLOCK_FREQ_EHL, },
-	{ PCI_VDEVICE(INTEL, 0x4bc2), M_CAN_CLOCK_FREQ_EHL, },
+	{ PCI_VDEVICE(INTEL, 0x4bc1), },
+	{ PCI_VDEVICE(INTEL, 0x4bc2), },
 	{  }	/* Terminating Entry */
 };
 MODULE_DEVICE_TABLE(pci, m_can_pci_id_table);

---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260511-topic-mcan-pci-driverdata-v7-1-d5bfc4f7d80e

Best regards,
-- 
Markus Schneider-Pargmann <msp@baylibre.com>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] can: m_can: pci: Remove driver_data
  2026-05-11  8:49 [PATCH] can: m_can: pci: Remove driver_data Markus Schneider-Pargmann (The Capable Hub)
@ 2026-05-11  9:04 ` Uwe Kleine-König
  0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2026-05-11  9:04 UTC (permalink / raw)
  To: Markus Schneider-Pargmann (The Capable Hub)
  Cc: Marc Kleine-Budde, Vincent Mailhol, linux-can, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

Hello Markus,

On Mon, May 11, 2026 at 10:49:16AM +0200, Markus Schneider-Pargmann (The Capable Hub) wrote:
> @@ -183,8 +183,8 @@ static SIMPLE_DEV_PM_OPS(m_can_pci_pm_ops,
>  			 m_can_pci_suspend, m_can_pci_resume);
>  
>  static const struct pci_device_id m_can_pci_id_table[] = {
> -	{ PCI_VDEVICE(INTEL, 0x4bc1), M_CAN_CLOCK_FREQ_EHL, },
> -	{ PCI_VDEVICE(INTEL, 0x4bc2), M_CAN_CLOCK_FREQ_EHL, },
> +	{ PCI_VDEVICE(INTEL, 0x4bc1), },
> +	{ PCI_VDEVICE(INTEL, 0x4bc2), },

nitpick: typically the trailing comma isn't added if the closing curly
bracket is on the same line.

Otherwise looks good to me

Acked-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>

(even if you keep the patch as is).

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-11  9:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11  8:49 [PATCH] can: m_can: pci: Remove driver_data Markus Schneider-Pargmann (The Capable Hub)
2026-05-11  9:04 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox