summaryrefslogtreecommitdiff
path: root/kernel-devel/linux-device/pres_linux-device_en.tex
diff options
context:
space:
mode:
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,