soc/tegra: pmc: Use driver-private data
Instead of relying on a global variable for the PMC context, use the driver-private data for sysfs attributes. Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
bb946b0e11
commit
2e944c51d6
|
|
@ -2243,6 +2243,7 @@ static int tegra_pmc_pinctrl_init(struct tegra_pmc *pmc)
|
|||
static ssize_t reset_reason_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct tegra_pmc *pmc = dev_get_drvdata(dev);
|
||||
u32 value;
|
||||
|
||||
value = tegra_pmc_readl(pmc, pmc->soc->regs->rst_status);
|
||||
|
|
@ -2260,6 +2261,7 @@ static DEVICE_ATTR_RO(reset_reason);
|
|||
static ssize_t reset_level_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct tegra_pmc *pmc = dev_get_drvdata(dev);
|
||||
u32 value;
|
||||
|
||||
value = tegra_pmc_readl(pmc, pmc->soc->regs->rst_status);
|
||||
|
|
|
|||
Loading…
Reference in New Issue