[bootlin/training-materials updates] master: Kernel slides: add "struct" keyword in example (eb9e7454)
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Fri Oct 29 10:46:36 CEST 2021
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/eb9e745458be44929cd49fc0575f63d1b3ca48da
>---------------------------------------------------------------
commit eb9e745458be44929cd49fc0575f63d1b3ca48da
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date: Tue Apr 20 15:10:47 2021 +0200
Kernel slides: add "struct" keyword in example
Signen-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>
>---------------------------------------------------------------
eb9e745458be44929cd49fc0575f63d1b3ca48da
slides/kernel-frameworks2/kernel-frameworks2.tex | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/slides/kernel-frameworks2/kernel-frameworks2.tex b/slides/kernel-frameworks2/kernel-frameworks2.tex
index 4563c4e6..6e8ac04b 100644
--- a/slides/kernel-frameworks2/kernel-frameworks2.tex
+++ b/slides/kernel-frameworks2/kernel-frameworks2.tex
@@ -410,7 +410,7 @@ static int xxxfb_probe (struct pci_dev *dev, const struct pci_device_id *ent)
\begin{minted}{c}
int foo_probe(struct platform_device *pdev)
{
- foo_t *foo = kmalloc(sizeof(struct foo_t),
+ struct foo_t *foo = kmalloc(sizeof(struct foo_t),
GFP_KERNEL);
/* Register to framework, store
* reference to framework structure in foo */
@@ -425,7 +425,7 @@ int foo_probe(struct platform_device *pdev)
void foo_remove(struct platform_device *pdev)
{
- foo_t *foo = platform_get_drvdata(pdev);
+ struct foo_t *foo = platform_get_drvdata(pdev);
/* Retrieve framework structure from foo
and unregister it */
...
@@ -439,7 +439,7 @@ void foo_remove(struct platform_device *pdev)
\begin{minted}{c}
int foo_probe(struct platform_device *pdev)
{
- foo_t *foo = devm_kmalloc(&pdev->dev,
+ struct foo_t *foo = devm_kmalloc(&pdev->dev,
sizeof(struct foo_t),
GFP_KERNEL);
/* Register to framework, store
@@ -453,7 +453,7 @@ int foo_probe(struct platform_device *pdev)
void foo_remove(struct platform_device *pdev)
{
- foo_t *foo = platform_get_drvdata(pdev);
+ struct foo_t *foo = platform_get_drvdata(pdev);
/* Retrieve framework structure from foo
and unregister it */
...
More information about the training-materials-updates
mailing list