Re: [PATCH] Add intel drm blacklist to intel_opregion_present detect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 23 August 2010 13:40:48 Lee, Chun-Yi wrote:
> There have some machines not support by i915 drm driver, e.g. MSI U110/U150,
> there are use poulsbo chip and drm driver not support it because legal issue.
> Those machines's acpi backlight control actually work fine and don't need apply
> the intel opregion support.
> So, add intel drm blacklist to intel_opregion_present, it can enable the acpi
> brightness interface on Poulsbo/Morrestown.
> 
> Signed-off-by: Lee, Chun-Yi <jlee@xxxxxxxxxx>
...
> @@ -2567,7 +2584,14 @@ static int __init intel_opregion_present(void)
>  		pci_read_config_dword(dev, 0xfc, &address);
>  		if (!address)
>  			continue;
> -		return 1;
> +		for (i = 0; intel_drm_blacklist[i].device != 0; i++) {
> +			if (dev->device == intel_drm_blacklist[i].device) {
> +				in_blacklist = 1;
> +				break;
You can just return 0 here...
> +			}
> +		}
> +		if (!in_blacklist)
> +			return 1;
and get rid of in_blacklist variable.
Makes the code a bit easier to read.

      Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux