Generate a hwdb instead of udev rules

We only use the rules/hwdb to enable auto-suspend. So, instead of
shipping our own rules, we can just use the existing autosuspend rules
and ship a hwdb that sets the appropriate flag.

Closes: #336
This commit is contained in:
Benjamin Berg
2021-01-19 14:13:03 +01:00
parent 16095a21fd
commit 55a2bb5536
5 changed files with 20 additions and 17 deletions

View File

@@ -175,11 +175,11 @@ drivers_type_func += '}'
root_inc = include_directories('.')
if get_option('udev_rules')
udev_rules_dir = get_option('udev_rules_dir')
udev_hwdb_dir = get_option('udev_hwdb_dir')
if udev_rules_dir == 'auto'
if udev_hwdb_dir == 'auto'
udev_dep = dependency('udev')
udev_rules_dir = udev_dep.get_pkgconfig_variable('udevdir') + '/rules.d'
udev_hwdb_dir = udev_dep.get_pkgconfig_variable('udevdir') + '/hwdb.d'
endif
endif