summaryrefslogtreecommitdiff
path: root/kernel-devel/linux-device/pres_linux-device_en.tex
diff options
context:
space:
mode:
authorManuel Traut <manut@linutronix.de>2012-04-13 01:01:20 +0200
committerManuel Traut <manut@linutronix.de>2018-03-16 21:37:38 +0100
commit82a80bd9f60dda4ae6ea5cf230742e7d6bb1433b (patch)
tree5e031923911f2be82785e5a6c3c6d5cc72df97f6 /kernel-devel/linux-device/pres_linux-device_en.tex
parent5b9a6ec39f0608de73642e4ca9bfa122b5099f74 (diff)
add example for linux device
Signed-off-by: Manuel Traut <manut@linutronix.de>
Diffstat (limited to 'kernel-devel/linux-device/pres_linux-device_en.tex')
-rw-r--r--kernel-devel/linux-device/pres_linux-device_en.tex5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel-devel/linux-device/pres_linux-device_en.tex b/kernel-devel/linux-device/pres_linux-device_en.tex
index 1b87bc7..c234b36 100644
--- a/kernel-devel/linux-device/pres_linux-device_en.tex
+++ b/kernel-devel/linux-device/pres_linux-device_en.tex
@@ -174,6 +174,7 @@ these fields should be initialized before calling the register function:
\item parent
\item name
\item bus
+\item class
\end{itemize}
\end{frame}
@@ -203,8 +204,8 @@ Attributes can be exported to sysfs by the device driver.
\begin{lstlisting}[frame=trBL]
my.c:
...
-static DEVICE_ATTR(ro, 0444, my_show_ro, NULL);
-static DEVICE_ATTR(rw, 0644, my_show_rw, my_store_rw);
+static DEVICE_ATTR(ro_example, 0444, my_show_ro, NULL);
+static DEVICE_ATTR(rw_example, 0644, my_show_rw, my_store_rw);
static struct attribute *my_dev_attrs[] = {
&dev_attr_ro.attr,