From: Jim Huang Date: Sat, 7 Aug 2021 02:59:15 +0000 (+0800) Subject: Tidy section: The Device Model X-Git-Tag: latest~191 X-Git-Url: https://www.ivnss.com/gitweb/?a=commitdiff_plain;h=40e83aa14bc812c63d1f4d9ea21354c353a164c9;p=lkmpg Tidy section: The Device Model --- diff --git a/examples/devicemodel.c b/examples/devicemodel.c index ee9163f..6cef830 100644 --- a/examples/devicemodel.c +++ b/examples/devicemodel.c @@ -18,7 +18,7 @@ static int devicemodel_probe(struct platform_device *dev) pr_info("devicemodel probe\n"); pr_info("devicemodel greeting: %s; %d\n", pd->greeting, pd->number); - /* Your device initialisation code */ + /* Your device initialization code */ return 0; } diff --git a/lkmpg.tex b/lkmpg.tex index 7ea2b23..024b32c 100644 --- a/lkmpg.tex +++ b/lkmpg.tex @@ -1519,9 +1519,11 @@ Here is an example of symmetrically encrypting a string using the AES algorithm \samplec{examples/cryptosk.c} -\section{Standardising the interfaces: The Device Model} -\label{sec:org5e14930} -Up to this point we've seen all kinds of modules doing all kinds of things, but there was no consistency in their interfaces with the rest of the kernel. To impose some consistency such that there is at minimum a standardised way to start, suspend and resume a device a device model was added. An example is show below, and you can use this as a template to add your own suspend, resume or other interface functions. +\section{Standardizing the interfaces: The Device Model} +\label{sec:device_model} +Up to this point we have seen all kinds of modules doing all kinds of things, but there was no consistency in their interfaces with the rest of the kernel. +To impose some consistency such that there is at minimum a standardized way to start, suspend and resume a device a device model was added. +An example is show below, and you can use this as a template to add your own suspend, resume or other interface functions. \samplec{examples/devicemodel.c}