]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
media: ttpci: coding style fixes: constant_comparsation
authorStefan Herdler <herdler@nurfuerspam.de>
Mon, 15 Apr 2024 02:24:09 +0000 (04:24 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 15 Apr 2024 22:02:53 +0000 (00:02 +0200)
This patch fixes the following checkpatch warnings:

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test

Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/pci/ttpci/budget-av.c
drivers/media/pci/ttpci/budget-core.c
drivers/media/pci/ttpci/budget.c

index 9549e385a909e4d634e06dee1f58cb14cdeda451..76660d22f114176a4aabfc3ba2b5ea101a301888 100644 (file)
@@ -442,7 +442,7 @@ static int saa7113_setinput(struct budget_av *budget_av, int input)
 {
        struct budget *budget = &budget_av->budget;
 
-       if (1 != budget_av->has_saa7113)
+       if (budget_av->has_saa7113 != 1)
                return -ENODEV;
 
        if (input == 1) {
@@ -1366,7 +1366,7 @@ static int budget_av_detach(struct saa7146_dev *dev)
 
        dprintk(2, "dev: %p\n", dev);
 
-       if (1 == budget_av->has_saa7113) {
+       if (budget_av->has_saa7113 == 1) {
                saa7146_setgpio(dev, 0, SAA7146_GPIO_OUTLO);
 
                msleep(200);
index dc8b2de307991568cae7d1f89a50408c830b8c6e..101695c71cc4572eb946a871fddec36fa4240cb4 100644 (file)
@@ -516,7 +516,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
        ttpci_eeprom_parse_mac(&budget->i2c_adap, budget->dvb_adapter.proposed_mac);
 
        budget->grabbing = saa7146_vmalloc_build_pgtable(dev->pci, budget->buffer_size, &budget->pt);
-       if (NULL == budget->grabbing) {
+       if (budget->grabbing == NULL) {
                ret = -ENOMEM;
                goto err_del_i2c;
        }
index 28a479ce0754bb4615decbec081d4ebd1a99ebd7..36aef9303223d1cbe89cb2de425a483b73284f45 100644 (file)
@@ -791,7 +791,7 @@ static int budget_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d
        int err;
 
        budget = kmalloc(sizeof(struct budget), GFP_KERNEL);
-       if (NULL == budget)
+       if (budget == NULL)
                return -ENOMEM;
 
        dprintk(2, "dev:%p, info:%p, budget:%p\n", dev, info, budget);