summaryrefslogtreecommitdiff
path: root/include/linux/nubus.h
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2018-01-14 01:37:13 +0300
committerGeert Uytterhoeven <geert@linux-m68k.org>2018-01-16 18:47:29 +0300
commit189e19e8cbb49f5bf483e55bdbd1e56d3d6bcf75 (patch)
tree8965cd03d125100f4788e69d2be0fcf92d31ed1f /include/linux/nubus.h
parent2f7dd07ecadac6bdc3d55c217d65efa2834ba1cb (diff)
downloadlinux-189e19e8cbb49f5bf483e55bdbd1e56d3d6bcf75.tar.xz
nubus: Rename struct nubus_dev
It is misleading to call a functional resource a "device". In adopting the Linux Driver Model, the struct device will be embedded in struct nubus_board. That will compound the terminlogy problem because drivers will bind with boards, not with functional resources. Avoid this by renaming struct nubus_dev as struct nubus_rsrc. "Functional resource" is the vendor's terminology so this helps avoid confusion. Cc: "David S. Miller" <davem@davemloft.net> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'include/linux/nubus.h')
-rw-r--r--include/linux/nubus.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/include/linux/nubus.h b/include/linux/nubus.h
index 0a9e08e76606..4a481610ad38 100644
--- a/include/linux/nubus.h
+++ b/include/linux/nubus.h
@@ -33,7 +33,7 @@ struct nubus_dirent {
struct nubus_board {
struct nubus_board *next;
- struct nubus_dev *first_dev;
+ struct nubus_rsrc *first_func_rsrc;
/* Only 9-E actually exist, though 0-8 are also theoretically
possible, and 0 is a special case which represents the
@@ -62,11 +62,11 @@ struct nubus_board {
struct proc_dir_entry *procdir;
};
-struct nubus_dev {
- /* Next link in device list */
- struct nubus_dev *next;
+struct nubus_rsrc {
+ /* Next link in list */
+ struct nubus_rsrc *next;
- /* The functional resource ID of this device */
+ /* The functional resource ID */
unsigned char resid;
/* These are mostly here for convenience; we could always read
them from the ROMs if we wanted to */
@@ -81,8 +81,8 @@ struct nubus_dev {
struct nubus_board *board;
};
-/* This is all NuBus devices (used to find devices later on) */
-extern struct nubus_dev *nubus_devices;
+/* This is all NuBus functional resources (used to find devices later on) */
+extern struct nubus_rsrc *nubus_func_rsrcs;
/* This is all NuBus cards */
extern struct nubus_board *nubus_boards;
@@ -115,13 +115,12 @@ static inline void nubus_proc_add_rsrc(struct proc_dir_entry *procdir,
const struct nubus_dirent *ent) {}
#endif
-/* If we need more precision we can add some more of these */
-struct nubus_dev *nubus_find_type(unsigned short category,
- unsigned short type,
- const struct nubus_dev *from);
-/* Might have more than one device in a slot, you know... */
-struct nubus_dev *nubus_find_slot(unsigned int slot,
- const struct nubus_dev *from);
+struct nubus_rsrc *nubus_find_type(unsigned short category,
+ unsigned short type,
+ const struct nubus_rsrc *from);
+
+struct nubus_rsrc *nubus_find_slot(unsigned int slot,
+ const struct nubus_rsrc *from);
/* These are somewhat more NuBus-specific. They all return 0 for
success and -1 for failure, as you'd expect. */
@@ -134,8 +133,7 @@ int nubus_get_root_dir(const struct nubus_board *board,
int nubus_get_board_dir(const struct nubus_board *board,
struct nubus_dir *dir);
/* The functional directory */
-int nubus_get_func_dir(const struct nubus_dev *dev,
- struct nubus_dir *dir);
+int nubus_get_func_dir(const struct nubus_rsrc *fres, struct nubus_dir *dir);
/* These work on any directory gotten via the above */
int nubus_readdir(struct nubus_dir *dir,