Re: [PATCH 1/2] staging: sm750fb: avoid conflicting vesafb
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date: 2017-06-20 20:09:14
Also in:
lkml
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date: 2017-06-20 20:09:14
Also in:
lkml
On Mon, Jun 19, 2017 at 11:47:20PM +0300, Andy Shevchenko wrote:
On Mon, Jun 19, 2017 at 11:32 PM, Sudip Mukherjee [off-list ref] wrote:quoted
+#ifdef CONFIG_X86 + primary = pdev->resource[PCI_ROM_RESOURCE].flags & + IORESOURCE_ROM_SHADOW; +#endifWhy do we need #ifdef?
It has been done in exactly the same way it is done in drm drivers. All the drm drivers I have checked uses #ifdef. See for example: http://elixir.free-electrons.com/linux/v4.12-rc6/source/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c#L470 If you think #ifdef is not required, please send patch for the drm drivers, and we follow that change here also.
In any case you may introduce a temporary variable to have pointer to resource struct resource *res = &pdev->resource[PCI_ROM_RESOURCE];
No, we will not want to do it in a different way than the way it is done by drm drivers. -- Regards Sudip