cregit-Linux how code gets into the kernel

Release 4.11 arch/avr32/mach-at32ap/pdc.c

/*
 * Copyright (C) 2006 Atmel Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <linux/clk.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/platform_device.h>


static int __init pdc_probe(struct platform_device *pdev) { struct clk *pclk, *hclk; pclk = clk_get(&pdev->dev, "pclk"); if (IS_ERR(pclk)) { dev_err(&pdev->dev, "no pclk defined\n"); return PTR_ERR(pclk); } hclk = clk_get(&pdev->dev, "hclk"); if (IS_ERR(hclk)) { dev_err(&pdev->dev, "no hclk defined\n"); clk_put(pclk); return PTR_ERR(hclk); } clk_enable(pclk); clk_enable(hclk); dev_info(&pdev->dev, "Atmel Peripheral DMA Controller enabled\n"); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Håvard Skinnemoen122100.00%1100.00%
Total122100.00%1100.00%

static struct platform_driver pdc_driver = { .driver = { .name = "pdc", }, };
static int __init pdc_init(void) { return platform_driver_probe(&pdc_driver, pdc_probe); }

Contributors

PersonTokensPropCommitsCommitProp
Håvard Skinnemoen1583.33%150.00%
Uwe Kleine-König316.67%150.00%
Total18100.00%2100.00%

arch_initcall(pdc_init);

Overall Contributors

PersonTokensPropCommitsCommitProp
Håvard Skinnemoen17298.29%150.00%
Uwe Kleine-König31.71%150.00%
Total175100.00%2100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.