Commit e7558452 authored by Federico Vaga's avatar Federico Vaga

drv:compat: use kallsyms to get private fpga_mgr_class

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 7bfb5a5e
......@@ -3,6 +3,7 @@
* Copyright (C) 2017 CERN (www.cern.ch)
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <linux/kallsyms.h>
#include <linux/module.h>
#include <linux/fpga/fpga-mgr.h>
#include <linux/version.h>
......@@ -138,8 +139,9 @@ static int fpga_mgr_dev_match(struct device *dev, const void *data)
*
* Return: fpga manager struct or IS_ERR() condition containing error code.
*/
static struct fpga_manager *fpga_mgr_get(struct device *dev)
struct fpga_manager *fpga_mgr_get(struct device *dev)
{
void *fpga_mgr_class = (void*) kallsyms_lookup_name("fpga_mgr_class");
struct device *mgr_dev = class_find_device(fpga_mgr_class, NULL, dev,
fpga_mgr_dev_match);
if (!mgr_dev)
......
......@@ -6,7 +6,6 @@
*
* Driver for SPEC (Simple PCI FMC carrier) board.
*/
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/interrupt.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment