mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fixup! driver: bus: embed bus driver node into bus
       [not found] <https://lore.barebox.org/barebox/20250605210726.1916656-2-a.fatoum@barebox.org/T/#u>
@ 2025-06-05 21:21 ` Ahmad Fatoum
  2025-06-06  6:25   ` Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-06-05 21:21 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

With this, CI is happy on all tested targets.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 drivers/bus/acpi.c       | 12 ++++++------
 drivers/efi/efi-device.c | 14 +++++++-------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/bus/acpi.c b/drivers/bus/acpi.c
index 92325c16e234..f586b605d0d4 100644
--- a/drivers/bus/acpi.c
+++ b/drivers/bus/acpi.c
@@ -138,7 +138,7 @@ static struct device *acpi_add_device(struct bus_type *bus,
 	dev = xzalloc(sizeof(*dev));
 
 	dev->bus = bus;
-	dev->parent = bus->dev;
+	dev->parent = &bus->dev;
 	dev->id = DEVICE_ID_DYNAMIC;
 	devinfo_add(dev, acpi_devinfo);
 
@@ -149,7 +149,7 @@ static struct device *acpi_add_device(struct bus_type *bus,
 
 static int acpi_register_devices(struct bus_type *bus)
 {
-	struct efi_config_table *table = bus->dev->priv;
+	struct efi_config_table *table = bus->dev.priv;
 	struct acpi_rsdp *rsdp;
 	struct acpi_rsdt *root;
 	size_t entry_count;
@@ -165,7 +165,7 @@ static int acpi_register_devices(struct bus_type *bus)
 	 * 5.2.5.2 Finding the RSDP on UEFI Enabled Systems
 	 */
 	if (memcmp("RSD PTR ", rsdp->signature, sizeof(rsdp->signature))) {
-		dev_dbg(bus->dev, "unexpected signature at start of config table: '%.8s'\n",
+		dev_dbg(&bus->dev, "unexpected signature at start of config table: '%.8s'\n",
 			rsdp->signature);
 		return -ENODEV;
 	}
@@ -183,12 +183,12 @@ static int acpi_register_devices(struct bus_type *bus)
 	}
 
 	if (acpi_sigcmp(sig, root->sdt.signature)) {
-		dev_err(bus->dev, "Expected %s, but found '%.4s'.\n",
+		dev_err(&bus->dev, "Expected %s, but found '%.4s'.\n",
 			sig, root->sdt.signature);
 		return -EIO;
 	}
 
-	dev_info(bus->dev, "Found %s (OEM: %.8s) with %zu entries\n",
+	dev_info(&bus->dev, "Found %s (OEM: %.8s) with %zu entries\n",
 		sig, root->sdt.oem_id, entry_count);
 
 	for (i = 0; i < entry_count; i++) {
@@ -232,7 +232,7 @@ static int efi_acpi_probe(void)
 	if (!table)
 		return 0;
 
-	acpi_bus.dev->priv = table;
+	acpi_bus.dev.priv = table;
 	return acpi_register_devices(&acpi_bus);
 }
 postcore_efi_initcall(efi_acpi_probe);
diff --git a/drivers/efi/efi-device.c b/drivers/efi/efi-device.c
index 23fcef7957fe..0e6f75659f62 100644
--- a/drivers/efi/efi-device.c
+++ b/drivers/efi/efi-device.c
@@ -421,17 +421,17 @@ static int efi_init_devices(void)
 
 	bus_register(&efi_bus);
 
-	dev_add_param_fixed(efi_bus.dev, "fw_vendor", fw_vendor);
+	dev_add_param_fixed(&efi_bus.dev, "fw_vendor", fw_vendor);
 	free(fw_vendor);
 
-	dev_add_param_uint32_fixed(efi_bus.dev, "major", sys_major, "%u");
-	dev_add_param_uint32_fixed(efi_bus.dev, "minor", sys_minor, "%u");
-	dev_add_param_uint32_fixed(efi_bus.dev, "fw_revision", efi_sys_table->fw_revision, "%u");
-	dev_add_param_bool_fixed(efi_bus.dev, "secure_boot", secure_boot);
-	dev_add_param_bool_fixed(efi_bus.dev, "secure_mode",
+	dev_add_param_uint32_fixed(&efi_bus.dev, "major", sys_major, "%u");
+	dev_add_param_uint32_fixed(&efi_bus.dev, "minor", sys_minor, "%u");
+	dev_add_param_uint32_fixed(&efi_bus.dev, "fw_revision", efi_sys_table->fw_revision, "%u");
+	dev_add_param_bool_fixed(&efi_bus.dev, "secure_boot", secure_boot);
+	dev_add_param_bool_fixed(&efi_bus.dev, "secure_mode",
 				 secure_boot & setup_mode);
 
-	devinfo_add(efi_bus.dev, efi_businfo);
+	devinfo_add(&efi_bus.dev, efi_businfo);
 
 	efi_register_devices();
 
-- 
2.39.5




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

* Re: [PATCH] fixup! driver: bus: embed bus driver node into bus
  2025-06-05 21:21 ` [PATCH] fixup! driver: bus: embed bus driver node into bus Ahmad Fatoum
@ 2025-06-06  6:25   ` Ahmad Fatoum
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2025-06-06  6:25 UTC (permalink / raw)
  To: Ahmad Fatoum, barebox

On 05.06.25 23:21, Ahmad Fatoum wrote:
> With this, CI is happy on all tested targets.

Please dismiss, I sent a v2 with this squashed.

> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
> ---
>  drivers/bus/acpi.c       | 12 ++++++------
>  drivers/efi/efi-device.c | 14 +++++++-------
>  2 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/bus/acpi.c b/drivers/bus/acpi.c
> index 92325c16e234..f586b605d0d4 100644
> --- a/drivers/bus/acpi.c
> +++ b/drivers/bus/acpi.c
> @@ -138,7 +138,7 @@ static struct device *acpi_add_device(struct bus_type *bus,
>  	dev = xzalloc(sizeof(*dev));
>  
>  	dev->bus = bus;
> -	dev->parent = bus->dev;
> +	dev->parent = &bus->dev;
>  	dev->id = DEVICE_ID_DYNAMIC;
>  	devinfo_add(dev, acpi_devinfo);
>  
> @@ -149,7 +149,7 @@ static struct device *acpi_add_device(struct bus_type *bus,
>  
>  static int acpi_register_devices(struct bus_type *bus)
>  {
> -	struct efi_config_table *table = bus->dev->priv;
> +	struct efi_config_table *table = bus->dev.priv;
>  	struct acpi_rsdp *rsdp;
>  	struct acpi_rsdt *root;
>  	size_t entry_count;
> @@ -165,7 +165,7 @@ static int acpi_register_devices(struct bus_type *bus)
>  	 * 5.2.5.2 Finding the RSDP on UEFI Enabled Systems
>  	 */
>  	if (memcmp("RSD PTR ", rsdp->signature, sizeof(rsdp->signature))) {
> -		dev_dbg(bus->dev, "unexpected signature at start of config table: '%.8s'\n",
> +		dev_dbg(&bus->dev, "unexpected signature at start of config table: '%.8s'\n",
>  			rsdp->signature);
>  		return -ENODEV;
>  	}
> @@ -183,12 +183,12 @@ static int acpi_register_devices(struct bus_type *bus)
>  	}
>  
>  	if (acpi_sigcmp(sig, root->sdt.signature)) {
> -		dev_err(bus->dev, "Expected %s, but found '%.4s'.\n",
> +		dev_err(&bus->dev, "Expected %s, but found '%.4s'.\n",
>  			sig, root->sdt.signature);
>  		return -EIO;
>  	}
>  
> -	dev_info(bus->dev, "Found %s (OEM: %.8s) with %zu entries\n",
> +	dev_info(&bus->dev, "Found %s (OEM: %.8s) with %zu entries\n",
>  		sig, root->sdt.oem_id, entry_count);
>  
>  	for (i = 0; i < entry_count; i++) {
> @@ -232,7 +232,7 @@ static int efi_acpi_probe(void)
>  	if (!table)
>  		return 0;
>  
> -	acpi_bus.dev->priv = table;
> +	acpi_bus.dev.priv = table;
>  	return acpi_register_devices(&acpi_bus);
>  }
>  postcore_efi_initcall(efi_acpi_probe);
> diff --git a/drivers/efi/efi-device.c b/drivers/efi/efi-device.c
> index 23fcef7957fe..0e6f75659f62 100644
> --- a/drivers/efi/efi-device.c
> +++ b/drivers/efi/efi-device.c
> @@ -421,17 +421,17 @@ static int efi_init_devices(void)
>  
>  	bus_register(&efi_bus);
>  
> -	dev_add_param_fixed(efi_bus.dev, "fw_vendor", fw_vendor);
> +	dev_add_param_fixed(&efi_bus.dev, "fw_vendor", fw_vendor);
>  	free(fw_vendor);
>  
> -	dev_add_param_uint32_fixed(efi_bus.dev, "major", sys_major, "%u");
> -	dev_add_param_uint32_fixed(efi_bus.dev, "minor", sys_minor, "%u");
> -	dev_add_param_uint32_fixed(efi_bus.dev, "fw_revision", efi_sys_table->fw_revision, "%u");
> -	dev_add_param_bool_fixed(efi_bus.dev, "secure_boot", secure_boot);
> -	dev_add_param_bool_fixed(efi_bus.dev, "secure_mode",
> +	dev_add_param_uint32_fixed(&efi_bus.dev, "major", sys_major, "%u");
> +	dev_add_param_uint32_fixed(&efi_bus.dev, "minor", sys_minor, "%u");
> +	dev_add_param_uint32_fixed(&efi_bus.dev, "fw_revision", efi_sys_table->fw_revision, "%u");
> +	dev_add_param_bool_fixed(&efi_bus.dev, "secure_boot", secure_boot);
> +	dev_add_param_bool_fixed(&efi_bus.dev, "secure_mode",
>  				 secure_boot & setup_mode);
>  
> -	devinfo_add(efi_bus.dev, efi_businfo);
> +	devinfo_add(&efi_bus.dev, efi_businfo);
>  
>  	efi_register_devices();
>  


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2025-06-06  6:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <https://lore.barebox.org/barebox/20250605210726.1916656-2-a.fatoum@barebox.org/T/#u>
2025-06-05 21:21 ` [PATCH] fixup! driver: bus: embed bus driver node into bus Ahmad Fatoum
2025-06-06  6:25   ` Ahmad Fatoum

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