iio: light: tsl2563: Drop unused defintion(s)
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 7 Dec 2022 19:03:42 +0000 (21:03 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 28 Dec 2022 17:19:45 +0000 (17:19 +0000)
commitbbabf9199126d7eb950ccc369543c462cc58e1b7
tree7b54db78f1278706c14e6b54579a55e2ea88ec31
parentb90619c4efee915c6419373b1ec024878ee7e38c
iio: light: tsl2563: Drop unused defintion(s)

The CALIB_FRAC() is defined and might had been used in
tsl2563_calib_from_sysfs(). But let's just move a comment
from it to the latter function.

CLAIB_FRAC_HALF is used in a single place, i.e. in
tsl2563_calib_to_sysfs(). So, let's just inline it there.

While at it, switch to use DIV_ROUND_CLOSEST().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221207190348.9347-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/tsl2563.c