mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
intel_th: Constify all drvdata references
Anything that deals with drvdata structures should leave them intact. Reflect this in function signatures. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210414171251.14672-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3fae829eac
commit
a525ed1787
@ -844,7 +844,7 @@ static irqreturn_t intel_th_irq(int irq, void *data)
|
||||
* @irq: irq number
|
||||
*/
|
||||
struct intel_th *
|
||||
intel_th_alloc(struct device *dev, struct intel_th_drvdata *drvdata,
|
||||
intel_th_alloc(struct device *dev, const struct intel_th_drvdata *drvdata,
|
||||
struct resource *devres, unsigned int ndevres)
|
||||
{
|
||||
int err, r, nr_mmios = 0;
|
||||
|
@ -74,7 +74,7 @@ struct intel_th_drvdata {
|
||||
*/
|
||||
struct intel_th_device {
|
||||
struct device dev;
|
||||
struct intel_th_drvdata *drvdata;
|
||||
const struct intel_th_drvdata *drvdata;
|
||||
struct resource *resource;
|
||||
unsigned int num_resources;
|
||||
unsigned int type;
|
||||
@ -224,7 +224,7 @@ static inline struct intel_th *to_intel_th(struct intel_th_device *thdev)
|
||||
}
|
||||
|
||||
struct intel_th *
|
||||
intel_th_alloc(struct device *dev, struct intel_th_drvdata *drvdata,
|
||||
intel_th_alloc(struct device *dev, const struct intel_th_drvdata *drvdata,
|
||||
struct resource *devres, unsigned int ndevres);
|
||||
void intel_th_free(struct intel_th *th);
|
||||
|
||||
@ -272,7 +272,7 @@ struct intel_th {
|
||||
|
||||
struct intel_th_device *thdev[TH_SUBDEVICE_MAX];
|
||||
struct intel_th_device *hub;
|
||||
struct intel_th_drvdata *drvdata;
|
||||
const struct intel_th_drvdata *drvdata;
|
||||
|
||||
struct resource resource[TH_MMIO_END];
|
||||
int (*activate)(struct intel_th *);
|
||||
|
@ -71,7 +71,7 @@ static void intel_th_pci_deactivate(struct intel_th *th)
|
||||
static int intel_th_pci_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *id)
|
||||
{
|
||||
struct intel_th_drvdata *drvdata = (void *)id->driver_data;
|
||||
const struct intel_th_drvdata *drvdata = (void *)id->driver_data;
|
||||
struct resource resource[TH_MMIO_END + TH_NVEC_MAX] = {
|
||||
[TH_MMIO_CONFIG] = pdev->resource[TH_PCI_CONFIG_BAR],
|
||||
[TH_MMIO_SW] = pdev->resource[TH_PCI_STH_SW_BAR],
|
||||
|
Loading…
Reference in New Issue
Block a user