lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 29 Nov 2009 21:09:32 +0100
From:	Rafał Miłecki <zajec5@...il.com>
To:	Linux ACPI <linux-acpi@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Henrique de Moraes Holschuh <hmh@....eng.br>,
	Richard Purdie <rpurdie@...ys.net>
Subject: Re: Backlight device class redesign

W dniu 28 listopada 2009 01:30 użytkownik Rafał Miłecki
<zajec5@...il.com> napisał:
> As discussed in http://marc.info/?t=124947671300008&r=1&w=2 we need to
> redesign our backlight device class.

I was trying to make it work this way:
1. Everytime register request comes, look for backlight_display with given name.
1. A. If needed, create new backlight_display
2. Add new device to devices list of backlight_display
3. Find best device on devices list of backlight_display
4. Register if under /sys/class/backlight/name_of_display

This didn't work because of registering only the best device. Look at
this code in drivers/acpi/video.c:

device->backlight = backlight_device_register(name,
    NULL, device, &acpi_backlight_ops);
(...)
result = sysfs_create_link(&device->backlight->dev.kobj,
    &device->dev->dev.kobj, "device");

It expects device to be registered (have dev.kobj) after calling
backlight_device_register.

So in summary we just can not do lazy registration. Every device
passed to backlight_device_register has to be registered in that
function or never.

So I think we have to register every device and just keep symlink
/sys/class/backlight/display_name pointing best device. We could
register devices in
1) /sys/class/backlight/.devicename (hidden)
2) some /sys/class/internal-usage/devicename

Do you agree on this?

-- 
Rafał

Download attachment "backlight2.patch" of type "application/octet-stream" (5652 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ