Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix driver to work with newer kernel versions

A recent Fedora kernel update (v2.6.34.6-47.fc13) broke your
samsung-backlight module due to an extra argument being added; I
managed to fix it with the attached patch.

As many Fedora HOW-TO sites list your GitHub repo as a resource, I
think it would be beneficial to share it and perhaps push it to said
repo. I've tested it on my machines (plural).
  • Loading branch information...
commit 5b4e3ed757677a81cf9e83e542755d9204bd26bc 1 parent cb0feb7
Ben Arnold authored committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 samsung-backlight.c
View
5 samsung-backlight.c
@@ -127,6 +127,9 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
static int __init samsung_init(void)
{
+ struct backlight_properties props;
+ memset(&props, 0, sizeof(struct backlight_properties));
+
if (!dmi_check_system(samsung_dmi_table))
return -ENODEV;
@@ -145,7 +148,7 @@ static int __init samsung_init(void)
/* create a backlight device to talk to this one */
backlight_device = backlight_device_register("samsung",
&pci_device->dev,
- NULL, &backlight_ops);
+ NULL, &backlight_ops, &props);
if (IS_ERR(backlight_device)) {
pci_dev_put(pci_device);
return PTR_ERR(backlight_device);

4 comments on commit 5b4e3ed

@mattford63

This patch unfortunately breaks older kernels. Reverted it locally to be able to build the module on Debian Squeeze.

@gregkh
Owner

Of course, it is needed for newer kernels, that's the point :)

@mattford63

:-) I was kinda hoping that given people compile this on there distro/kernel of choice that it could be made a bit smarter..

@gregkh
Owner

Don't build this for any distro, use the in-kernel samsung-laptop driver instead and get a bios update from samsung to support it. This driver is not recommended for anyone and if they use it, they are on their own as it does not work properly, or correctly (the bios and video card do not know what the other one did so everything gets out of sync.)

There is a reason this is not upstream, and the other one is. I guess I should just delete this branch if people are trying to use it.

Please sign in to comment.
Something went wrong with that request. Please try again.