[PATCH v3 20/23] mailbox/riscv-sbi-mpxy: Add ACPI support

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon May 12 01:47:14 PDT 2025


On Mon, May 12, 2025 at 02:06:37PM +0530, Sunil V L wrote:
> On Mon, May 12, 2025 at 10:28:17AM +0300, Andy Shevchenko wrote:
> > On Sun, May 11, 2025 at 07:09:36PM +0530, Anup Patel wrote:

...

> > > +#ifdef CONFIG_ACPI
> > > +	if (!acpi_disabled)
> > 
> > Hmm... Why do you need this check? What for?
> > 
> When we boot with DT, ACPI_COMPANION(dev) will return NULL which will
> cause a crash in acpi_dev_clear_dependencies(). Let me know if I am
> missing something.

Yes, just check that the companion is NULL, rather than the above.

	struct acpi_device *adev;

	adev = ACPI_COMPANION(dev);
	if (adev)
		acpi_dev_clear_dependencies(adev);

> > > +		acpi_dev_clear_dependencies(ACPI_COMPANION(dev));
> > > +#endif

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-riscv mailing list