liblights: Always apply linear scaling if max brightness isn't 255
authorLuca Stefani <luca020400@lineageos.org>
Mon, 13 Mar 2017 13:53:14 +0000 (14:53 +0100)
committerLuca Stefani <luca020400@lineageos.org>
Mon, 13 Mar 2017 14:11:53 +0000 (15:11 +0100)
commita042209f6691ef6f80f31796d1ee1335a68a8cb2
tree8c291bfd33f8a636c0cc07524d8b6c806f09a552
parent3c99507fb6b3af18cb24ae83997b690836d971ab
liblights: Always apply linear scaling if max brightness isn't 255

* As of now the code account only max_brightness > 255
  -> Check if max_brightness != 255 and apply the scaling
     even if the max_brightness is less then 255

Change-Id: I809ece5844c8ccf20ae6507f23d308fe3ddfe94b
liblights/lights.c