summaryrefslogtreecommitdiff
path: root/Template
blob: 0847cdbf93c6ee8adb390799724b370491e8e88d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
define TOOL_templ
  include $(1)/Makefile
  $(1) $(1)%: BUILD_DIR := $(1)
  $(1) $(1)%: CFLAGS += $$($(1)-eflags)
  $(1)_prehook:
	$(Q)echo "$(bold)$(WHAT) $(1):$(normal)"
  $(1): $(1)_prehook $$($(1)-lex) $$($(1)-yacc) $$(patsubst %.o,$(1)/%.o,$$($(1)-objs))
  $(1)_clean: $(1)_clean_custom
	$(Q)$$(call RM,$(1)/*.o $(1)/$(1) $(1)/*.gz)
  $(1)_do_install:
	$(Q)$$(call INSTX,$(1)/$(1),$$(DESTDIR)$$(SBINDIR))
	$(Q)$(GZIP) $(1).8 > $(1)/$(1).8.gz
	$(Q)$$(call INST,$(1)/$(1).8.gz,$$(DESTDIR)$$(MAN8DIR))
	$(Q)$$(foreach file,$$($(1)-confs),$$(call INST,$$(file),$$(DESTDIR)$$(ETCDIRE));)
  $(1)_install: $(1)_do_install $(1)_post_install
  $(1)_uninstall: $(1)_uninstall_custom
	$(Q)$$(call RM,$$(DESTDIR)$$(SBINDIR)/$(1))
	$(Q)$$(call RM,$$(DESTDIR)$$(MAN8DIR)/$(1).8.gz)
  $(1)/%.yy.o: $(1)/%.yy.c
	$$(CCQ) $$(CFLAGS) -o $$@ -c $$<
  $(1)/%.tab.o: $(1)/%.tab.c
	$$(CCQ) $$(CFLAGS) -o $$@ -c $$<
  $(1)/%.o: %.c %.h
	$$(CHECK) $$(CFLAGS) $$(CHECKFLAGS) $$<
	$$(CCQ) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$<
  $(1)/%.o: %.c
	$$(CHECK) $$(CFLAGS) $$(CHECKFLAGS) $$<
	$$(CCQ) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$<
endef
s='commit-subject'>HID: sensor: fix attributes in HID sensor interface
User is unable to access to input-X-yyy and feature-X-yyy where X is a hex value and more than 9 (e.g. input-a-yyy, feature-b-yyy) in HID sensor custom sysfs interface. This is because when creating the attribute, the attribute index is written to using %x (hex). However, when reading and writing values into the attribute, the attribute index is scanned using %d (decimal). Hence, user is unable to access to attributes with index in hex values (e.g. 'a', 'b', 'c') but able to access to attributes with index in decimal values (e.g. 1, 2, 3,..). This fix will change input-%d-%x-%s and feature-%d-%x-%s to input-%x-%x-%s and feature-%x-%x-%s in show_values() and store_values() accordingly. Signed-off-by: Ooi, Joyce <joyce.ooi@intel.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat