diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-03-31 18:49:26 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-03-31 18:49:26 +0300 |
commit | 58233ccf94607c1df2c545b689c52c0b002f054e (patch) | |
tree | 3ecaec3f0904c2ea841e6d3f86d586176986cd22 /drivers | |
parent | 458ef2a25e0cbdc216012aa2b9cf549d64133b08 (diff) | |
parent | 86cded5fc52567774b596827544874499532b8ae (diff) | |
download | linux-58233ccf94607c1df2c545b689c52c0b002f054e.tar.xz |
Merge tag 'm68k-for-v5.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven:
- pagetable layout rewrite, to facilitate global READ_ONCE() rework
- Zorro (Amiga) and DIO (HP 9000/300) bus cleanups
- defconfig updates
- minor cleanups and fixes
* tag 'm68k-for-v5.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (23 commits)
m68k: defconfig: Update defconfigs for v5.6-rc4
zorro: Replace zero-length array with flexible-array member
m68k: Switch to asm-generic/hardirq.h
fbdev: c2p: Use BUILD_BUG() instead of custom solution
dio: Remove unused dio_dev_driver()
dio: Fix dio_bus_match() kerneldoc
dio: Make dio_match_device() static
zorro: Move zorro_bus_type to bus-private header file
zorro: Remove unused zorro_dev_driver()
zorro: Use zorro_match_device() helper in zorro_bus_match()
zorro: Fix zorro_bus_match() kerneldoc
zorro: Make zorro_match_device() static
m68k: Fix Kconfig indentation
m68k: mm: Change ColdFire pgtable_t
m68k: mm: Fully initialize the page-table allocator
m68k: mm: Extend table allocator for multiple sizes
m68k: mm: Use table allocator for pgtables
m68k: mm: Improve kernel_page_table()
m68k: mm: Restructure Motorola MMU page-table layout
m68k: mm: Move the pointer table allocator to motorola.c
...
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dio/dio-driver.c | 9 | ||||
-rw-r--r-- | drivers/video/fbdev/c2p_core.h | 12 | ||||
-rw-r--r-- | drivers/zorro/zorro-driver.c | 16 | ||||
-rw-r--r-- | drivers/zorro/zorro.c | 2 | ||||
-rw-r--r-- | drivers/zorro/zorro.h | 7 |
5 files changed, 23 insertions, 23 deletions
diff --git a/drivers/dio/dio-driver.c b/drivers/dio/dio-driver.c index a7b174ef4c85..69c46935ffc7 100644 --- a/drivers/dio/dio-driver.c +++ b/drivers/dio/dio-driver.c @@ -25,7 +25,7 @@ * dio_device_id structure or %NULL if there is no match. */ -const struct dio_device_id * +static const struct dio_device_id * dio_match_device(const struct dio_device_id *ids, const struct dio_dev *d) { @@ -105,9 +105,9 @@ void dio_unregister_driver(struct dio_driver *drv) * @dev: the DIO device structure to match against * @drv: the &device_driver that points to the array of DIO device id structures to search * - * Used by a driver to check whether a DIO device present in the - * system is in its list of supported devices. Returns the matching - * dio_device_id structure or %NULL if there is no match. + * Used by the driver core to check whether a DIO device present in the + * system is in a driver's list of supported devices. Returns 1 if supported, + * and 0 if there is no match. */ static int dio_bus_match(struct device *dev, struct device_driver *drv) @@ -137,7 +137,6 @@ static int __init dio_driver_init(void) postcore_initcall(dio_driver_init); -EXPORT_SYMBOL(dio_match_device); EXPORT_SYMBOL(dio_register_driver); EXPORT_SYMBOL(dio_unregister_driver); EXPORT_SYMBOL(dio_bus_type); diff --git a/drivers/video/fbdev/c2p_core.h b/drivers/video/fbdev/c2p_core.h index 45a6d895a7d7..cf5f1ebce65e 100644 --- a/drivers/video/fbdev/c2p_core.h +++ b/drivers/video/fbdev/c2p_core.h @@ -12,6 +12,8 @@ * for more details. */ +#include <linux/build_bug.h> + /* * Basic transpose step @@ -27,8 +29,6 @@ static inline void _transp(u32 d[], unsigned int i1, unsigned int i2, } -extern void c2p_unsupported(void); - static __always_inline u32 get_mask(unsigned int n) { switch (n) { @@ -48,7 +48,7 @@ static __always_inline u32 get_mask(unsigned int n) return 0x0000ffff; } - c2p_unsupported(); + BUILD_BUG(); return 0; } @@ -91,7 +91,7 @@ static __always_inline void transp8(u32 d[], unsigned int n, unsigned int m) return; } - c2p_unsupported(); + BUILD_BUG(); } @@ -118,7 +118,7 @@ static __always_inline void transp4(u32 d[], unsigned int n, unsigned int m) return; } - c2p_unsupported(); + BUILD_BUG(); } @@ -138,7 +138,7 @@ static __always_inline void transp4x(u32 d[], unsigned int n, unsigned int m) return; } - c2p_unsupported(); + BUILD_BUG(); } diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c index fa23b7366b98..0dd7cbcec2b0 100644 --- a/drivers/zorro/zorro-driver.c +++ b/drivers/zorro/zorro-driver.c @@ -28,7 +28,7 @@ * zorro_device_id structure or %NULL if there is no match. */ -const struct zorro_device_id * +static const struct zorro_device_id * zorro_match_device(const struct zorro_device_id *ids, const struct zorro_dev *z) { @@ -39,7 +39,6 @@ zorro_match_device(const struct zorro_device_id *ids, } return NULL; } -EXPORT_SYMBOL(zorro_match_device); static int zorro_device_probe(struct device *dev) @@ -120,9 +119,9 @@ EXPORT_SYMBOL(zorro_unregister_driver); * @ids: array of Zorro device id structures to search in * @dev: the Zorro device structure to match against * - * Used by a driver to check whether a Zorro device present in the - * system is in its list of supported devices.Returns the matching - * zorro_device_id structure or %NULL if there is no match. + * Used by the driver core to check whether a Zorro device present in the + * system is in a driver's list of supported devices. Returns 1 if + * supported, and 0 if there is no match. */ static int zorro_bus_match(struct device *dev, struct device_driver *drv) @@ -134,12 +133,7 @@ static int zorro_bus_match(struct device *dev, struct device_driver *drv) if (!ids) return 0; - while (ids->id) { - if (ids->id == ZORRO_WILDCARD || ids->id == z->id) - return 1; - ids++; - } - return 0; + return !!zorro_match_device(ids, z); } static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env) diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c index 8eeb84c239db..47c733817903 100644 --- a/drivers/zorro/zorro.c +++ b/drivers/zorro/zorro.c @@ -41,7 +41,7 @@ struct zorro_dev *zorro_autocon; struct zorro_bus { struct device dev; - struct zorro_dev devices[0]; + struct zorro_dev devices[]; }; diff --git a/drivers/zorro/zorro.h b/drivers/zorro/zorro.h index ac0bab3412d9..f84df9fb4c20 100644 --- a/drivers/zorro/zorro.h +++ b/drivers/zorro/zorro.h @@ -1,5 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0 */ + /* + * Zorro bus + */ + +extern struct bus_type zorro_bus_type; + + #ifdef CONFIG_ZORRO_NAMES extern void zorro_name_device(struct zorro_dev *z); #else |