aboutsummaryrefslogtreecommitdiffstats
path: root/lib/lufa
Commit message (Collapse)AuthorAgeFilesLines
* Fix mismatched aliased event and event stub function prototypes.Dean Camera2018-09-1114-13/+38
|
* Remove unneccesary ATTR_CONST from stub functions (thanks to NicoHood).Dean Camera2018-09-114-4/+4
|
* gcc 8.10 compilation fix (#2914)sameehj2018-05-092-2/+2
| | | | | | | | | | | | | | | | | | * Use memmove instead of memcpy gcc 8.1 gives the following error: lib/lufa/LUFA/Drivers/USB/Class/Common/HIDParser.c:93:5: error: 'memcpy' accessing 42 bytes at offsets 28 and 0 overlaps 14 bytes at offset 28 [-Werror=restrict] This patch resolve this by using memmove instead Signed-off-by: Sameeh <Sameeh Jubran> * Remove ATTR_CONST from a void returning function gcc 8.10 gives the following error when attempting to compile lib/lufa/LUFA/Drivers/USB/Core/Events.h:334:5: error: 'const' attribute on function returning 'void' [-Werror=attributes] Signed-off-by: Sameeh <Sameeh Jubran>
* QMK DFU bootloader generation (#2009)Jack Humbert2017-11-145-14/+39
| | | | | | | | | | | | | | | | | | | | | | * adds :bootloader target * update planck and preonic revisions * remove references to .h files for planck * update preonic keymap * only add keyboard.h files that exist * add production target * hook things up with the new lufa variables * update rules for planck/preonic * back backlight key turn of status led when pressed * add manufacturer/product strings to bootloader
* Merge commit '8858438a770c1c982f33b296447ca77176c751f7'Jack Humbert2017-07-096-407/+407
|
* more crlf issuesskullY2017-07-0866-4416/+4416
|
* commit files with wrong line endingsskullY2017-07-0833-2700/+2700
|
* Merge commit 'cedfbfcb1a9ad9cf93816f1952fc4bf7c55fbb61'Jack Humbert2017-07-071-0/+94
|
* delete old lufaJack Humbert2017-07-074-276/+276
|
* Merge commit '60b30c036397cb5627fa374bb930794b225daa29' as 'lib/lufa'Jack Humbert2017-07-071455-0/+394541
ght .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
From dacb1a46835914b8c3862db15726bcc0a68af8f5 Mon Sep 17 00:00:00 2001
From: Rob Herring <robh@kernel.org>
Date: Mon, 28 Oct 2019 11:32:32 -0500
Subject: [PATCH] resource: Add a resource_list_first_type helper

commit 494f8b10d832456a96be4ee7317425f6936cabc8 upstream.

A common pattern is looping over a resource_list just to get a matching
entry with a specific type. Add resource_list_first_type() helper which
implements this.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
 include/linux/resource_ext.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

--- a/include/linux/resource_ext.h
+++ b/include/linux/resource_ext.h
@@ -66,4 +66,16 @@ resource_list_destroy_entry(struct resou
 #define resource_list_for_each_entry_safe(entry, tmp, list)	\
 	list_for_each_entry_safe((entry), (tmp), (list), node)
 
+static inline struct resource_entry *
+resource_list_first_type(struct list_head *list, unsigned long type)
+{
+	struct resource_entry *entry;
+
+	resource_list_for_each_entry(entry, list) {
+		if (resource_type(entry->res) == type)
+			return entry;
+	}
+	return NULL;
+}
+
 #endif /* _LINUX_RESOURCE_EXT_H */