Re: [PATCH v3 09/11] leds: max77650: add LEDs support

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

 



Hi!


> >> +static struct max77650_led *max77650_to_led(struct led_classdev *cdev)
> >> +{
> >> +    return container_of(cdev, struct max77650_led, cdev);
> >> +}
> >> +
> >> +static int max77650_led_brightness_set(struct led_classdev *cdev,
> >> +                       enum led_brightness brightness)
> >> +{
> >> +    struct max77650_led *led = max77650_to_led(cdev);
> >> +    int val, mask;
> >> +
> 
> The register value and bits are only 8 bit why an int?

int is word size CPU prefers. It is ok here. If you force u8, it may
actually result in slower/bigger code.
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux