lkml.org 
[lkml]   [2013]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [tpmdd-devel] [PATCH 1/5 v2] tpm: Pull everything related to /dev/tpmX into tpm-dev.c
From
Date
Nice clean up!!! The code looks much more clean after removing the
duplicated code in all drivers. Thanks.


> diff --git a/drivers/char/tpm/tpm-dev.c b/drivers/char/tpm/tpm-dev.c
> new file mode 100644
> index 0000000..8d94e97
> --- /dev/null
> +++ b/drivers/char/tpm/tpm-dev.c
> + * Copyright (C) 2013 Obsidian Reearch Corp

Typo Research?

> + * Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> + *

> +
> +int tpm_dev_add_device(struct tpm_chip *chip)
> +{

> + rc = misc_register(&chip->vendor.miscdev);
> + if (rc) {
> + chip->vendor.miscdev.name = NULL;
> + dev_warn(chip->dev,

Any reason why we use dev_warn here instead of dev_err?

> + "unable to misc_register %s, minor %d err=%d\n",
> + chip->vendor.miscdev.name,
> + chip->vendor.miscdev.minor, rc);
> + }
> + return rc;
> +}
> +

Reviewed-by: Ashley Lai <adlai@linux.vnet.ibm.com>

Regards,
--Ashley Lai



\
 
 \ /
  Last update: 2013-11-16 23:41    [W:0.125 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site