Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1654695 > unrolled thread

[PATCH v3 4/9] mtd: nand: sharpsl.c: take in account partition parser types

Started byAndrea Adami <andrea.adami@gmail.com>
First post2017-06-01 00:50 +0200
Last post2017-06-01 10:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 4/9] mtd: nand: sharpsl.c: take in account partition parser types Andrea Adami <andrea.adami@gmail.com> - 2017-06-01 00:50 +0200
    Re: [PATCH v3 4/9] mtd: nand: sharpsl.c: take in account partition  parser types Wolfram Sang <wsa@the-dreams.de> - 2017-06-01 10:40 +0200

#1654695 — [PATCH v3 4/9] mtd: nand: sharpsl.c: take in account partition parser types

FromAndrea Adami <andrea.adami@gmail.com>
Date2017-06-01 00:50 +0200
Subject[PATCH v3 4/9] mtd: nand: sharpsl.c: take in account partition parser types
Message-ID<tNkBb-2ET-17@gated-at.bofh.it>
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
 drivers/mtd/nand/sharpsl.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c
index 064ca17..1a76779 100644
--- a/drivers/mtd/nand/sharpsl.c
+++ b/drivers/mtd/nand/sharpsl.c
@@ -183,8 +183,13 @@ static int sharpsl_nand_probe(struct platform_device *pdev)
 	/* Register the partitions */
 	mtd->name = "sharpsl-nand";
 
-	err = mtd_device_parse_register(mtd, NULL, NULL,
-					data->partitions, data->nr_partitions);
+	err = mtd_device_parse_register(&sharpsl->mtd,
+					data->types ? data->types : NULL,
+					NULL,
+					data->partitions ?
+					data->partitions : NULL,
+					data->nr_partitions ?
+					data->nr_partitions : 0);
 	if (err)
 		goto err_add;
 
-- 
2.7.4

[toc] | [next] | [standalone]


#1654929 — Re: [PATCH v3 4/9] mtd: nand: sharpsl.c: take in account partition parser types

FromWolfram Sang <wsa@the-dreams.de>
Date2017-06-01 10:40 +0200
SubjectRe: [PATCH v3 4/9] mtd: nand: sharpsl.c: take in account partition parser types
Message-ID<tNtOa-cj-11@gated-at.bofh.it>
In reply to#1654695

[Multipart message — attachments visible in raw view] — view raw

> +					data->types ? data->types : NULL,

This is equal to just 'data_types'.

> +					NULL,
> +					data->partitions ?
> +					data->partitions : NULL,
> +					data->nr_partitions ?
> +					data->nr_partitions : 0);

All the ternary operators are superfluous.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web